Public report of ampproject/amphtml, published 15 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 report Measured 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, 15 November 2026, 05:25 UTC · Survey ID cd_a665d2cbbac548869b6c8cb7853a7f71

ampproject/amphtml

Measured 15 November 2026, 05:22 UTC, at code version 3961d2e

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 38out of 100 At risk No change 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: 318,218 lines of product code in 55 projects, tests not counted · Estimated rebuild effort: about 3.3 person-years · Weakest lens: Accessibility, 27

Findings by how serious they are

183 critical 1672 serious 1221 minor

7 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

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 05:22 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 ▸

80of 80 dimensions measured by tools.
3008of 3076 findings point to an exact file and line, so you can open each one in the code. The other 68 concern the repository as a whole, such as missing documentation.
80dimensions across 7 lenses, read from 318,218 lines of product code in 55 projects.
Chapters

Executive summary

ampproject/amphtml is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back in part because it has images with no text description. It scores 38 out of 100, which the At risk rating leaves unchanged.

Accessibility, at 27, is the weakest lens and counts most in the score. The best first step is replacing the two exposed passwords or keys and switching the old ones off, worth about 5 points. Adding text alternatives would lift Accessibility itself, also worth about 5. Raising Accessibility to 70 would lift the score to about 47.

Ninety-two known security holes in the packages the code depends on can be used by attackers. Twenty weaknesses in the code could be used by an attacker, and seven pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages, fixing the weaknesses the scanner points to and pinning each tool to an exact version would close these risks. The three passwords or keys in the code's history and the two passwords or keys in the code need replacing, with the old ones switched off. The three places where the code runs text as code or as a command need a direct call instead. The 12 pages that don't say their language need their language set.

The product code is 318,218 lines, about €490,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 for The 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.
Accessibility 27 · counts for 46%Production Readiness 38 · counts for 25%Maturity 45 · counts for 14%Performance 60 · counts for 8%Code Health 62 · counts for 4%Security and Compliance 67 · counts for 2%Architecture 81 · counts for 1%

If Accessibility rose from 27 to 70, the lowest score rated Strong, the score would rise from 38 to about 47.

Code composition: what the lines of code are
Product code 56%Tests 44%
New since the last survey: 75 findings

These 75 critical or serious findings weren't in the previous survey, on 29 October 2026.

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: 2326 findings

These 2326 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · flexible-ad-slot-utils.getElementWidthVisitor (cyclomatic 17) extensions/amp-ad-network-doubleclick-impl/0.1/flexible-ad-slot-utils.js
  • Cyclomatic Complexity · flexible-ad-slot-utils.getElementWidthVisitor (cyclomatic 17) extensions/amp-ad-network-valueimpression-impl/0.1/flexible-ad-slot-utils.js
  • Secrets (history) · REDACTED: square-access-token build-system/tmp.txt
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.esm.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.esm.html
  • Secrets (history) · REDACTED: jwt examples/ads.amp.esm.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.esm.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.esm.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.esm.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: jwt examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/ads.with.script.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/amp-access-fewcents.html
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: jwt REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: jwt REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED REDACTED
  • Secrets (history) · REDACTED: REDACTED examples/amp-yotpo.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/amp-yotpo.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/amp-yotpo.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/apester-media.amp.html
  • Secrets (history) · REDACTED: REDACTED examples/recaptcha.amp.html
  • Static Analysis (SAST) · High: watchdog-request-param-to-fs-read-sink-ts REDACTED
  • Static Analysis (SAST) · Medium: watchdog-regexp-from-parameter-ts 3p/twitter.js
  • Static Analysis (SAST) · Medium: REDACTED build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/index.js
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: REDACTED REDACTED
  • Static Analysis (SAST) · Medium: watchdog-regexp-from-parameter-ts REDACTED
  • Code Duplication · Duplicated block (42 lines × 2 locations) extensions/amp-video/1.0/storybook/Basic.amp.js
  • Code Duplication · Duplicated block (41 lines × 2 locations) extensions/amp-accordion/1.0/storybook/Bind.amp.js
  • Code Duplication · Duplicated block (41 lines × 2 locations) extensions/amp-base-carousel/1.0/amp-base-carousel.js
  • Code Duplication · Duplicated block (38 lines × 2 locations) extensions/amp-mowplayer/0.1/amp-mowplayer.js
  • Code Duplication · Duplicated block with local edits (37 matched lines × 2 locations) ads/vendors/runative.js
  • Code Duplication · Duplicated block with local edits (36 matched lines × 2 locations) extensions/amp-sidebar/1.0/base-element.js
  • Code Duplication · Duplicated block with local edits (35 matched lines × 2 locations) testing/intersection-observer-stub.js
  • Code Duplication · Duplicated block (34 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (34 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (33 lines × 2 locations) build-system/eslint-rules/no-log-array.js
  • Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) extensions/amp-apester-media/0.1/monetization/companion/video.js
  • Code Duplication · Duplicated block (33 lines × 2 locations) extensions/amp-experiment/0.1/variant.js
  • Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) extensions/amp-story/1.0/amp-story-system-layer.js
  • Code Duplication · Duplicated block (33 lines × 2 locations) src/core/dom/layout/intersection-no-root.js
  • Code Duplication · Duplicated block (33 lines × 2 locations) src/polyfills/stubs/intersection-observer-stub.js
  • Code Duplication · Duplicated block (32 lines × 2 locations) extensions/amp-access/0.1/amp-access-source.js
  • Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) extensions/amp-accordion/0.1/amp-accordion.js
  • Code Duplication · Duplicated block (31 lines × 2 locations) extensions/amp-experiment/0.1/variant.js
  • Code Duplication · Duplicated block with local edits (31 matched lines × 2 locations) src/amp.js
  • Code Duplication · Duplicated block with local edits (30 matched lines × 2 locations) build-system/pr-check/checks.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) extensions/amp-access/0.1/amp-access.js
  • Code Duplication · Duplicated block (30 lines × 2 locations) extensions/amp-date-countdown/1.0/amp-date-countdown.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) ads/vendors/andbeyond.js
  • Code Duplication · Duplicated block with local edits (29 matched lines × 2 locations) build-system/pr-check/experiment-e2e-tests.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) extensions/amp-access/0.1/amp-access-source.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) extensions/amp-accordion/1.0/amp-accordion.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) extensions/amp-analytics/0.1/crc32.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (29 matched lines × 2 locations) extensions/amp-date-picker/0.1/dates-list.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) extensions/amp-image-viewer/0.1/amp-image-viewer.js
  • Code Duplication · Duplicated block (29 lines × 2 locations) extensions/amp-mowplayer/0.1/amp-mowplayer.js
  • Code Duplication · Duplicated block with local edits (29 matched lines × 2 locations) src/core/assert/dev.js
  • Code Duplication · Duplicated block with local edits (28 matched lines × 2 locations) extensions/amp-app-banner/0.1/amp-app-banner.js
  • Code Duplication · Duplicated block (28 lines × 2 locations) extensions/amp-base-carousel/0.1/amp-base-carousel.js
  • Code Duplication · Duplicated block (28 lines × 2 locations) extensions/amp-carousel/0.1/scrollable-carousel.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) ads/vendors/imonomy.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) ads/vendors/miximedia.js
  • Code Duplication · Duplicated block with local edits (27 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (27 matched lines × 2 locations) extensions/amp-base-carousel/0.1/amp-base-carousel.js
  • Code Duplication · Duplicated block with local edits (27 matched lines × 2 locations) extensions/amp-image-slider/0.1/amp-image-slider.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) extensions/amp-inline-gallery/1.0/storybook/Basic.js
  • Code Duplication · Duplicated block (27 lines × 2 locations) extensions/amp-sidebar/1.0/storybook/Basic.amp.js
  • Code Duplication · Duplicated block with local edits (27 matched lines × 2 locations) src/service/ampdoc-impl.js
  • Code Duplication · Duplicated block with local edits (26 matched lines × 2 locations) build-system/pr-check/module-tests.js
  • Code Duplication · Duplicated block (26 lines × 2 locations) REDACTED
Rebuild cost: about €490,000 · Estimate
Cost to rebuild€160,000 to €810,000, for 2,690 to 8,535 hours of work, about 3.3 person-years for 1 to 7 engineers
Difficulty of the problemStandard, 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 38. 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.
SizeLarge: 318,218 lines of product code
What it is notNot 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 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.
Raises the score by about 5 points · Low effort · REDACTED Scanning
2
Resolve the 7 No assertions (empty test) finding(s) in Test Quality — start with test-history.js (2), test-amp-list.js (2), test-impression.js.
Raises the score by about 3 points · Low effort · Test Quality
3
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.
Raises the score by about 3 points · Low effort · ADR Quality

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 €490,000 to build again, about 3.3 person-years of work. Its weakest lens is Accessibility, at 27 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
If you do one thing first · First action
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning. 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 2 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch //cpp/engine/wasm:validator_inner_wrapper wasm:validator_inner_wrapper //cpp/engine:error-formatter engine:error-formatter //cpp/engine/wasm:validator_inner_wrapper->//cpp/engine:error-formatter //cpp/engine:testing-utils engine:testing-utils //cpp/engine/wasm:validator_inner_wrapper->//cpp/engine:testing-utils //cpp/engine:validator engine:validator //cpp/engine/wasm:validator_inner_wrapper->//cpp/engine:validator //cpp/htmlparser:logging htmlparser:logging //cpp/engine:error-formatter->//cpp/htmlparser:logging //cpp/htmlparser:strings htmlparser:strings //cpp/engine:error-formatter->//cpp/htmlparser:strings //cpp/engine:parse-viewport engine:parse-viewport //cpp/engine:utf8-util engine:utf8-util //cpp/engine:parse-viewport->//cpp/engine:utf8-util //cpp/engine:parse-viewport->//cpp/htmlparser:logging //cpp/engine:parse-viewport->//cpp/htmlparser:strings //cpp/engine:testing-utils->//cpp/engine:error-formatter //cpp/htmlparser:fileutil htmlparser:fileutil //cpp/engine:testing-utils->//cpp/htmlparser:fileutil //cpp/engine:testing-utils->//cpp/htmlparser:strings //cpp/engine:utf8-util->//cpp/htmlparser:logging //cpp/engine:utf8-util->//cpp/htmlparser:strings //cpp/engine:validator-internal engine:validator-internal //cpp/engine:validator->//cpp/engine:validator-internal //cpp/htmlparser/css:parse-css css:parse-css //cpp/engine:validator->//cpp/htmlparser/css:parse-css //cpp/engine:validator-internal->//cpp/engine:parse-viewport //cpp/engine:validator-internal->//cpp/engine:utf8-util //cpp/engine:validator-internal->//cpp/htmlparser/css:parse-css //cpp/htmlparser:atom htmlparser:atom //cpp/engine:validator-internal->//cpp/htmlparser:atom //cpp/htmlparser:atomutil htmlparser:atomutil //cpp/engine:validator-internal->//cpp/htmlparser:atomutil //cpp/htmlparser:defer htmlparser:defer //cpp/engine:validator-internal->//cpp/htmlparser:defer //cpp/htmlparser:node htmlparser:node //cpp/engine:validator-internal->//cpp/htmlparser:node //cpp/htmlparser:parser htmlparser:parser //cpp/engine:validator-internal->//cpp/htmlparser:parser //cpp/engine:validator-internal->//cpp/htmlparser:strings //cpp/htmlparser/css:parse-css->//cpp/htmlparser:logging //cpp/htmlparser/css:parse-css->//cpp/htmlparser:strings //cpp/htmlparser:atomutil->//cpp/htmlparser:atom //cpp/htmlparser:comparators htmlparser:comparators //cpp/htmlparser:document htmlparser:document //cpp/htmlparser:document->//cpp/htmlparser:node //cpp/htmlparser:token htmlparser:token //cpp/htmlparser:document->//cpp/htmlparser:token //cpp/htmlparser:fileutil->//cpp/htmlparser:defer //cpp/htmlparser:fileutil->//cpp/htmlparser:strings //cpp/htmlparser:node->//cpp/htmlparser:atom //cpp/htmlparser:node->//cpp/htmlparser:atomutil //cpp/htmlparser:node->//cpp/htmlparser:logging //cpp/htmlparser:node->//cpp/htmlparser:token //cpp/htmlparser:parser->//cpp/htmlparser:atom //cpp/htmlparser:parser->//cpp/htmlparser:atomutil //cpp/htmlparser:parser->//cpp/htmlparser:comparators //cpp/htmlparser:parser->//cpp/htmlparser:defer //cpp/htmlparser:parser->//cpp/htmlparser:document //cpp/htmlparser:parser->//cpp/htmlparser:logging //cpp/htmlparser:parser->//cpp/htmlparser:node //cpp/htmlparser:parser->//cpp/htmlparser:strings //cpp/htmlparser:tokenizer htmlparser:tokenizer //cpp/htmlparser:parser->//cpp/htmlparser:tokenizer //cpp/htmlparser:token->//cpp/htmlparser:atom //cpp/htmlparser:token->//cpp/htmlparser:strings //cpp/htmlparser:tokenizer->//cpp/htmlparser:atom //cpp/htmlparser:tokenizer->//cpp/htmlparser:atomutil //cpp/htmlparser:tokenizer->//cpp/htmlparser:defer //cpp/htmlparser:tokenizer->//cpp/htmlparser:strings //cpp/htmlparser:tokenizer->//cpp/htmlparser:token __more__ +35 more projects

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.

1100 modules, with 114 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 1060 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.
uses →1 3p.ampcontext2 build-system.server.new-server.transforms.utilities.cdn-tag3 build-system.server.new-server.transforms.utilities.option-set4 extensions.amp-a4a.0_1.amp-a4a5 extensions.amp-a4a.0_1.amp-ad-type-defs6 extensions.amp-access-scroll.0_1.scroll-component7 extensions.amp-access.0_1.amp-access-client8 extensions.amp-ad-exit.0_1.filters.filter9 extensions.amp-animation.0_1.runners.animation-runner10 extensions.amp-date-picker.1_0.types11 extensions.amp-story-interactive.0_1.amp-story-interactive-abstract12 extensions.amp-subscriptions.0_1.local-subscription-platform-base13 src.base-element14 src.base-template15 src.bento.components.bento-autocomplete.1_0.types16 src.service.variable-source17 3p.ampcontext-integration18 build-system.server.new-server.transforms.cdn19 build-system.server.new-server.transforms.modules20 build-system.server.new-server.transforms.sxg21 extensions.amp-a4a.0_1.a4a-variable-source22 extensions.amp-a4a.0_1.cryptographic-validator23 extensions.amp-a4a.0_1.friendly-frame-renderer24 extensions.amp-a4a.0_1.name-frame-renderer25 extensions.amp-a4a.0_1.template-renderer26 extensions.amp-a4a.0_1.template-validator27 extensions.amp-access-scroll.0_1.scroll-bar28 extensions.amp-access-scroll.0_1.scroll-impl29 extensions.amp-access-scroll.0_1.scroll-sheet30 extensions.amp-ad-exit.0_1.filters.click-delay31 extensions.amp-ad-exit.0_1.filters.click-location32 extensions.amp-ad-exit.0_1.filters.inactive-element33 extensions.amp-date-picker.1_0.component.use-date-picker-context34 extensions.amp-date-picker.1_0.component.use-date-picker-input35 extensions.amp-story-interactive.0_1.amp-story-interactive-results36 src.preact37 src.preact.base-element38 extensions.amp-date-picker.1_0.component39 src.bento.components.bento-facebook.1_0.base-element40 src.bento.components.bento-video.1_0.base-element
1 3p.ampcontext
2 build-system.server.new-server.transforms.utilities.cdn-tag
3 build-system.server.new-server.transforms.utilities.option-set
4 extensions.amp-a4a.0_1.amp-a4a
5 extensions.amp-a4a.0_1.amp-ad-type-defs
6 extensions.amp-access-scroll.0_1.scroll-component
7 extensions.amp-access.0_1.amp-access-client
8 extensions.amp-ad-exit.0_1.filters.filter
9 extensions.amp-animation.0_1.runners.animation-runner
10 extensions.amp-date-picker.1_0.types
11 extensions.amp-story-interactive.0_1.amp-story-interactive-abstract
12 extensions.amp-subscriptions.0_1.local-subscription-platform-base
13 src.base-element
14 src.base-template
15 src.bento.components.bento-autocomplete.1_0.types
16 src.service.variable-source
17 3p.ampcontext-integration1
18 build-system.server.new-server.transforms.cdn1
19 build-system.server.new-server.transforms.modules11
20 build-system.server.new-server.transforms.sxg1
21 extensions.amp-a4a.0_1.a4a-variable-source1
22 extensions.amp-a4a.0_1.cryptographic-validator1
23 extensions.amp-a4a.0_1.friendly-frame-renderer1
24 extensions.amp-a4a.0_1.name-frame-renderer1
25 extensions.amp-a4a.0_1.template-renderer1
26 extensions.amp-a4a.0_1.template-validator1
27 extensions.amp-access-scroll.0_1.scroll-bar1
28 extensions.amp-access-scroll.0_1.scroll-impl1
29 extensions.amp-access-scroll.0_1.scroll-sheet1
30 extensions.amp-ad-exit.0_1.filters.click-delay1
31 extensions.amp-ad-exit.0_1.filters.click-location1
32 extensions.amp-ad-exit.0_1.filters.inactive-element1
33 extensions.amp-date-picker.1_0.component.use-date-picker-context1
34 extensions.amp-date-picker.1_0.component.use-date-picker-input1
35 extensions.amp-story-interactive.0_1.amp-story-interactive-results1
36 src.preact1
37 src.preact.base-element1
38 extensions.amp-date-picker.1_0.component41
39 src.bento.components.bento-facebook.1_0.base-element31
40 src.bento.components.bento-video.1_0.base-element1
Uses a module listed above itPart of a loopThe module itself
1 3p.ampcontext2 build-system.server.new-server.transforms.utilities.cdn-tag3 build-system.server.new-server.transforms.utilities.option-set4 extensions.amp-a4a.0_1.amp-a4a5 extensions.amp-a4a.0_1.amp-ad-type-defs6 extensions.amp-access-scroll.0_1.scroll-component7 extensions.amp-access.0_1.amp-access-client8 extensions.amp-ad-exit.0_1.filters.filter9 extensions.amp-animation.0_1.runners.animation-runner10 extensions.amp-date-picker.1_0.types11 extensions.amp-story-interactive.0_1.amp-story-interactive-abstract12 extensions.amp-subscriptions.0_1.local-subscription-platform-base13 src.base-element14 src.base-template15 src.bento.components.bento-autocomplete.1_0.types16 src.service.variable-source17 3p.ampcontext-integration18 build-system.server.new-server.transforms.cdn19 build-system.server.new-server.transforms.modules20 build-system.server.new-server.transforms.sxg21 extensions.amp-a4a.0_1.a4a-variable-source22 extensions.amp-a4a.0_1.cryptographic-validator23 extensions.amp-a4a.0_1.friendly-frame-renderer24 extensions.amp-a4a.0_1.name-frame-renderer25 extensions.amp-a4a.0_1.template-renderer26 extensions.amp-a4a.0_1.template-validator27 extensions.amp-access-scroll.0_1.scroll-bar28 extensions.amp-access-scroll.0_1.scroll-impl29 extensions.amp-access-scroll.0_1.scroll-sheet30 extensions.amp-ad-exit.0_1.filters.click-delay31 extensions.amp-ad-exit.0_1.filters.click-location32 extensions.amp-ad-exit.0_1.filters.inactive-element33 extensions.amp-date-picker.1_0.component.use-date-picker-context34 extensions.amp-date-picker.1_0.component.use-date-picker-input35 extensions.amp-story-interactive.0_1.amp-story-interactive-results36 src.preact37 src.preact.base-element38 extensions.amp-date-picker.1_0.component39 src.bento.components.bento-facebook.1_0.base-element40 src.bento.components.bento-video.1_0.base-element3p.ampcontext1build-system.server.new-server.transforms.utilities.cdn-tag2build-system.server.new-server.transforms.utilities.option-set3extensions.amp-a4a.0_1.amp-a4a4extensions.amp-a4a.0_1.amp-ad-type-defs5extensions.amp-access-scroll.0_1.scroll-component6extensions.amp-access.0_1.amp-access-client7extensions.amp-ad-exit.0_1.filters.filter8extensions.amp-animation.0_1.runners.animation-runner9extensions.amp-date-picker.1_0.types10extensions.amp-story-interactive.0_1.amp-story-interactive-abstract11extensions.amp-subscriptions.0_1.local-subscription-platform-base12src.base-element13src.base-template14src.bento.components.bento-autocomplete.1_0.types15src.service.variable-source163p.ampcontext-integration17build-system.server.new-server.transforms.cdn18build-system.server.new-server.transforms.modules19build-system.server.new-server.transforms.sxg20extensions.amp-a4a.0_1.a4a-variable-source21extensions.amp-a4a.0_1.cryptographic-validator22extensions.amp-a4a.0_1.friendly-frame-renderer23extensions.amp-a4a.0_1.name-frame-renderer24extensions.amp-a4a.0_1.template-renderer25extensions.amp-a4a.0_1.template-validator26extensions.amp-access-scroll.0_1.scroll-bar27extensions.amp-access-scroll.0_1.scroll-impl28extensions.amp-access-scroll.0_1.scroll-sheet29extensions.amp-ad-exit.0_1.filters.click-delay30extensions.amp-ad-exit.0_1.filters.click-location31extensions.amp-ad-exit.0_1.filters.inactive-element32extensions.amp-date-picker.1_0.component.use-date-picker-context33extensions.amp-date-picker.1_0.component.use-date-picker-input34extensions.amp-story-interactive.0_1.amp-story-interactive-results35src.preact36src.preact.base-element37extensions.amp-date-picker.1_0.component38src.bento.components.bento-facebook.1_0.base-element39src.bento.components.bento-video.1_0.base-element40111111111111111111111141311+1060 more modules (most-connected shown)

At a glance — Code Health · 62% · Adequate ·

At a glance — Architecture · 81% · Strong ·

At a glance — Maturity · 45% · Weak · gated by D34, M2, M4 ·

At a glance — Readiness · 38% · Weak · gated by D13, R8, P7 ·

At a glance — Security · 67% · Adequate · gated by D29, D36 ·

At a glance — Accessibility · 27% · Weak · gated by AC1, AC3, AC4 ·

At a glance — Performance · 60% · Adequate ·

Security & Compliance — OWASP Top-10 mapping

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 categoryFindingsSeverity
A05:2025 — Injection296High / Critical
A03:2025 — Software Supply Chain Failures142High / Critical
A07:2025 — Authentication Failures6High / Critical

Roadmap

Top priorities: Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video; Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href; Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED.+4.5 ptsLowREDACTED Scanning
Resolve the 7 No assertions (empty test) finding(s) in Test Quality — start with test-history.js (2), test-amp-list.js (2), test-impression.js.+3.5 ptsLowTest Quality
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.+2.7 ptsLowADR Quality
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+5.3 ptsMediumText alternatives
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+5.3 ptsMediumKeyboard semantics
Resolve the 32 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (32).+4.1 ptsMediumDependency Hygiene
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+3.0 ptsMediumPage structure
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.+2.6 ptsMediumDependency Hygiene

File quality

Per-file score 0–10 — a quality signature. Of 580 files carrying findings, judged against the Production bar: 2% slop · 59% mixed · 39% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.2SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.4SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED0.6SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED0.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.3SlopDependency Vulnerabilities: High CVE: REDACTED
REDACTED1.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
extensions/amp-list/0.1/test/test-amp-list.js4.0MixedTest Quality: No assertions (empty test): should hide fallback element on fetch success
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
test/unit/core/window/test-history.js4.4MixedTest Quality: No assertions (empty test): should update fragment
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.5MixedDependency Vulnerabilities: High CVE: REDACTED

How the grades work

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 — 183

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 — 1672

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 — 1221

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 7

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 80 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 — 80 dimensions across the health lenses
D1D2D3D4D5D6D10D12D13D14D15D16D17D20D21D24D27D28D29D30D34D35D36D37D43D44AC1AC2AC3AC4AC5AC6AX10AX2AX3AX4AX6AX8C2GD1IC1M1M2M3M4P1P10P2P3P4P7PF3R1R10R11R2R3R4R5R7R8R9S1X1X12X13X14X16X17X18X19X2X21X24X28X29X3X30X4X5

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
  1. 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, 3008 of 3076 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.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. 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.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1dda7-e4fa-7197-892f-c734064d61ad.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

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.

  • 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 MEASURED: the JavaScript/TypeScript suite could not be re-run in the analyzer sandbox — the mocha run in validator/js/gulpjs/ produced no per-test report (> gulp-amphtml-validator@1.0.8 test). This is OUR limitation, not a defect in the repo — it is excluded from the score.
  • 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 mocha suite in validator/js/gulpjs/ was NOT MEASURED: the mocha run in validator/js/gulpjs/ produced no per-test report (> gulp-amphtml-validator@1.0.8 test). This is OUR limitation, not a defect in the repository, and the suite is excluded from the measurement rather than counted against it.
  • D19 Documentation Quality — 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 kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — 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. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — 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. 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.
  • D26 Project Cohesion — 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm, Deno or JSR package, a Go module, a Cargo crate, a Python, Composer, Bundler, RubyGems, Mix, rebar3, sbt, SwiftPM or pub package, an OTP application, an Xcode project or XcodeGen spec, or a checkout that declares no build at all) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
  • 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. `extensions/amp-story-auto-ads/0.1/_locales/index.js`, `extensions/amp-story-auto-ads/0.1/story-ad-localization.js`, `extensions/amp-story-interactive/0.1/interactive-disclaimer.js`, `extensions/amp-story-shopping/0.1/amp-story-shopping-config.js`, `extensions/amp-story/1.0/_locales/index.js`, … (+5 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.
  • AC3 Page structure — 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. 15 further occurrence(s) are not listed individually; the score already reflects all 55.
  • AX1 Captive dependencies — 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in src/service-helpers.js, whose lifetimes are not modelled 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.
  • 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 (serve). the dev server (`npm run serve`) exited before it served a page. Likely cause (the repository): REDACTED has no "serve" script, so `npm run serve` could not start the app. Last output: "npm error Missing script: "serve" / 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.
  • IC1 Incompleteness & stubs — 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. 160 further occurrence(s) are not listed individually; the score already reflects all 200.
  • 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. 422 further occurrence(s) are not listed individually; the score already reflects all 462.
  • R11 Import Boundaries — 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. 6 further occurrence(s) are not listed individually; the score already reflects all 46.
  • 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. 190 further occurrence(s) are not listed individually; the score already reflects all 230.
  • R3 Large Files — 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. 133 further occurrence(s) are not listed individually; the score already reflects all 173.
  • R4 Test Coverage — 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. 1003 further occurrence(s) are not listed individually; the score already reflects all 1043.
  • R7 Dead Code — 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. 729 further occurrence(s) are not listed individually; the score already reflects all 769.
  • R8 Dependency Hygiene — 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. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
  • 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. 68 further occurrence(s) are not listed individually; the score already reflects all 108.
  • X3 Exception handling — 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. 63 further occurrence(s) are not listed individually; the score already reflects all 103.

Repo exclusion declarations: 64 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.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • 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.
  • 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 REDACTED Scanning: REDACTED 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.
  • 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.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • 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.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • 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.
  • 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".

Dimensions

D1 · Cyclomatic Complexity5.1 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.1 / 10 · rule-coverage 100% · ceiling Prevented

194 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was custom-element.createBaseCustomElementClass at 233. A further 8 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 amp-story-store-service.actions at 38 — they are counted neither in the figure above nor in this dimension's score. 7 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: extensions/amp-story/1.0/amp-story-store-service.js (actions at 38), extensions/amp-story/1.0/amp-story-store-service.js (amp-story-store-service.actions at 38), ads/vendors/tail.js (tail.tail at 22), extensions/amp-addthis/0.1/addthis-utils/classify.js (classify.isSearchUrl at 22), REDACTED (handleDelightMessage_ at 19), and 2 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.

index.default (cyclomatic 23) · ×2build-system/babel-plugins/babel-plugin-jsx-style-object/index.js:67
flexible-ad-slot-utils.getElementWidthVisitor.<returned closure> (cyclomatic 17) · ×2extensions/amp-ad-network-doubleclick-impl/0.1/flexible-ad-slot-utils.js:25
AmpSidebar.buildCallback (cyclomatic 17) · ×2extensions/amp-sidebar/0.1/amp-sidebar.js:144
custom-element.createBaseCustomElementClass (cyclomatic 233)src/custom-element.js:123
ResourcesImpl.discoverWork_ (cyclomatic 66)src/service/resources-impl.js:1048

+ 126 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with custom-element.createBaseCustomElementClass (cyclomatic 233). — Refactoring it lifts Cyclomatic Complexity from 5.1 to about 5.8/10.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

273 method(s) exceeded the cognitive complexity threshold of 15; the worst was custom-element.createBaseCustomElementClass at 259.

buildCallback (cognitive 21) · ×3REDACTED:361
index.transformAjvCode::hoistProperties (cognitive 36) · ×2build-system/compile/json-schema/index.js:273
index.default (cognitive 28) · ×2build-system/babel-plugins/babel-plugin-jsx-style-object/index.js:67
index.default (cognitive 20) · ×2build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js:15
index.default (cognitive 16) · ×2build-system/babel-plugins/babel-plugin-amp-mode-transformer/index.js:11

+ 185 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with custom-element.createBaseCustomElementClass (cognitive 259). — Refactoring it lifts Cognitive Complexity from 5.0 to about 5.8/10.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.4 / 10Strong✓ 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.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Prevented

148 god class(es) detected.

TooManyMethods: AmpStory · ×53extensions/amp-story/1.0/amp-story.js:222
FileTooLong: 1.0/amp-story.js · ×35extensions/amp-story/1.0/amp-story.js
ClassTooLong: AmpStory · ×22extensions/amp-story/1.0/amp-story.js:222
FunctionTooLong: custom-element.createBaseCustomElementClass · ×21src/custom-element.js:123
MethodTooLong: GlobalVariableSource.initialize · ×17src/service/url-replacements-impl.js:125

What to do

  1. Resolve the 53 TooManyMethods finding(s) in God Classes — start with base-element.js (2), inabox-viewport.js (2), amp-story.js. — One of this dimension's main actionable groups (53 warning-level).
  2. Resolve the 35 FileTooLong finding(s) in God Classes — start with amp-story.js, amp-a4a.js, REDACTED. — One of this dimension's main actionable groups (35 warning-level).
  3. Resolve the 22 ClassTooLong finding(s) in God Classes — start with amp-story.js, amp-a4a.js, REDACTED. — One of this dimension's main actionable groups (22 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication10.0 / 10Stronggated by 2 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

2 duplicated block group(s) detected. 0.0 % of the production lines (90 of 318,218) are in a reported copy. Measured on part of this repository only: .js (91% of production source) was not exposed to THIS dimension's token comparison and is not in this count; duplication there is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream.

Duplicated block (13 lines × 2)REDACTED:104
Duplicated block (34 lines × 2)REDACTED:35

What to do

  1. Resolve the 1 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Duplicated block (34 lines × 2) finding(s) in Code Duplication — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling9.5 / 10Stronggated by 3 serious findings✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Prevented

55 production modules (Bazel), 0 dependency cycle(s), 3 unstable depended-on module(s). Read from the build's own module declarations, and main-sequence distance (abstractness) is not computed for these modules yet.

Unstable project //cpp/htmlparser:parser · ×2
Unstable project //cpp/engine:validator-internal

What to do

  1. Resolve the 2 Unstable project //cpp/htmlparser finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Unstable project //cpp/engine finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

3 of 530 classes have LCOM4 above 3.

Low cohesion: RuntimeTestConfig (LCOM4 6) · ×3build-system/tasks/runtime-test/runtime-test-base.js:45

What to do

  1. Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with runtime-test-base.js, amp-render.js, standard-actions-impl.js. — One of this dimension's main actionable groups (3 warning-level).

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D10 · Test Quality9.4 / 10Adequategated by 7 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.

Maturity: Documented → Verified → Prevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Prevented

154 skipped (12 with a documented reason), 290 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 12760 tests.

No assertions (empty test): should resolve trackImpressionPromise after timeout · ×7test/unit/test-impression.js:79
No assertions: fails after invalid AMP · ×283validator/js/gulpjs/test/validate.js:121
Skipped test: should sort adConfig in alphabetic order · ×142test/unit/test-ads-config.js:13
Skipped (documented): should propagate errors out and report them to upstream error log · ×12extensions/amp-a4a/0.1/test/test-a4a-integration.js:215

What to do

  1. Resolve the 7 No assertions (empty test) finding(s) in Test Quality — start with test-history.js (2), test-amp-list.js (2), test-impression.js. — One of this dimension's main actionable groups (7 issue-level).
  2. Resolve the 283 No assertions finding(s) in Test Quality — start with test-amp-image-slider.js (19), test-resource.js (15), test-analytics-root.js (12). — One of this dimension's main actionable groups (283 warning-level).
  3. Resolve the 142 Skipped test finding(s) in Test Quality — start with test-video-players-helper.js (13), test-amp-user-notification.js (13), test-url-replacements.js (7). — One of this dimension's main actionable groups (142 warning-level).

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene5.0 / 10Adequate✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Verified

50 outdated direct production npm dependency(ies) of 64 graded, 0 pinning defect(s), across 12 REDACTED (12 of them the product) and 11 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 7 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: intersection-observer · ×8REDACTED:28
Outdated (npm): @polymer/font-roboto · ×32validator/js/webui/REDACTED:15
Deprecated: stable · ×12REDACTED:1788
Outdated (npm): @polymer/polymer · ×18

What to do

  1. Resolve the 32 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (32). — One of this dimension's main actionable groups (32 recommendation-level).
  2. Resolve the 12 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (12). — One of this dimension's main actionable groups (12 recommendation-level).
  3. Resolve the 8 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (8). — One of this dimension's main actionable groups (8 warning-level).

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Prevented

2 secret(s) detected.

REDACTED

What to do

  1. Resolve the 2 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 149 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 149 package(s) this repository's committed lockfile installs for a consumer — its 64 production, optional and peer dependency(ies), across 12 product REDACTED manifest(s), and everything those install in turn. Its 190 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D16 · Bus Factor9.9 / 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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

7 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is REDACTED. Counted over 776 of the 1745 production source files in this repository: 828 are under the ~2,400-byte size floor this dimension measures over, and the remaining 141 have no attributable history left to measure.

Off-boarding risk: anonymized user #1
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.

D17 · Explicit Debt9.9 / 10Stronggated by 5 serious findings✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

5 deducted task-comment markers across 6049 LoC (0.1/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.

TodoComment · ×5REDACTED:92

What to do

  1. Resolve the 5 TodoComment finding(s) in Explicit Debt — start with REDACTED (2), REDACTED, constants.ts. — One of this dimension's main actionable groups (5 warning-level).

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundREDACTED:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency8.0 / 10Strong✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 8.0 / 10 · rule-coverage 100% · ceiling Verified

24 naming inconsistencies among 1214 declarations measured against a convention their peers follow.

`pollAMPDoc_` spells `AMP` where 188 names in the project spell it `Amp` · ×2extensions/amp-viewer-integration/0.1/viewer-initiated-handshake-viewer-for-testing.js:94
`getURL` spells `URL` where 440 names in the project spell it `Url`ads/vendors/a9.js:97
`parseJSONObj` spells `JSON` where 86 names in the project spell it `Json`ads/vendors/adocean.js:64
`siteID` spells `ID` where 454 names in the project spell it `Id`ads/vendors/ix.js:84
`slotID` spells `ID` where 454 names in the project spell it `Id`ads/vendors/ix.js:84

+ 18 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 2 `pollAMPDoc_` spells `AMP` where 188 names in the project spell it `Amp` finding(s) in Naming Consistency — start with viewer-initiated-handshake-viewer-for-testing.js, REDACTED. — One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 1 `getURL` spells `URL` where 440 names in the project spell it `Url` finding(s) in Naming Consistency — start with a9.js. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `parseJSONObj` spells `JSON` where 86 names in the project spell it… finding(s) in Naming Consistency — start with adocean.js. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D24 · Comment Value8.8 8.6 / 10Strong✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 8.6 / 10 · rule-coverage 97% · ceiling Documented

101 of 8584 judged comments only repeat the code they sit on (1.2 %). 363 comment(s) in another language or script were not judged.

redundant comment · ×833p/beopinion.js:52
doc comments repeat the names · ×3build-system/tasks/e2e/selenium-webdriver-controller.js:682

What to do

  1. Resolve the 83 redundant comment finding(s) in Comment Value — start with test-adplugg.js (4), mutation-record.js (3), mutation.js (3). — One of this dimension's main actionable groups (83 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

10 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED 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.

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 3 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 3 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

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).

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

306 finding(s): 0 critical, 40 high, 227 medium, 39 low. 2 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 46 file(s) — `REDACTED`, `examples/amp-action-macro.html` (line 16), `REDACTED` (line 991), `REDACTED` (line 946, lines 1953–1954), `REDACTED` (line 34, line 152), … (+41 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 3 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

+ 28 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 17 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (13), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (17 issue-level).
  2. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).
  3. No action in Static Analysis (SAST) — all 2 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 (2 issue-level, 0 of them charged here).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

137 finding(s): 10 critical, 82 high, 30 medium, 15 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 79 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (74), REDACTED (5). — One of this dimension's main actionable groups (79 issue-level).
  2. Resolve the 10 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9), REDACTED. — One of this dimension's main actionable groups (10 issue-level).
  3. Resolve the 3 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness0.2 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.2 / 10 · rule-coverage 100% · ceiling Documented

895 of 917 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is extensions/amp-a4a/0.1/amp-a4a.js. Counted over 917 of the 1745 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×892src/custom-element.js:1
Most significant orphaned file · ×3extensions/amp-a4a/0.1/amp-a4a.js:1
Concentrated knowledge decay

What to do

  1. Resolve the 892 Orphaned file finding(s) in Knowledge Freshness — start with REDACTED (41), REDACTED (29), REDACTED (17). — One of this dimension's main actionable groups (892 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with amp-a4a.js, amp-story.js, REDACTED. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Concentrated knowledge decay 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.

D35 · Change Coupling10.0 / 10Stronggated by 1 serious finding✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: check-sourcemaps.js↔helpers.js 53%

Change coupling: check-sourcemaps.js ↔ helpers.jsbuild-system/tasks/check-sourcemaps.js:1

What to do

  1. Resolve the 1 Change coupling finding(s) in Change Coupling — start with check-sourcemaps.js. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 23 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.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. (×4) — REDACTED:244, REDACTED:229, REDACTED:1102, …

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels4.8 / 10Weak✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one). (×7) — REDACTED:261, extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:174, extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:205, …
  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — build-system/server/app-index/proxy-form.js:9
  • This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. — extensions/amp-date-picker/1.0/component/component.tsx:38
  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — extensions/amp-story-interactive/0.1/amp-story-interactive-slider.js:29

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure3.4 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×12) — 3p/frame.max.html:1, 3p/recaptcha.max.html:1, REDACTED:1, …
  • A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>. (×7) — 3p/frame.max.html:1, 3p/recaptcha.max.html:1, REDACTED:1, …
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. (×14) — 3p/frame.max.html:1, 3p/recaptcha.max.html:1, REDACTED:1, …
  • An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. (×2) — REDACTED:904, REDACTED:29
  • An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. (×2) — REDACTED:1551, REDACTED:1554
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <amp-viewer>, so there is no content here to wrap — render the <main> from the component mounted into it. — build-system/server/shadow-viewer.js:133
  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — extensions/amp-access/0.1/amp-login-done.html:5
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <amp-bodymovin-animation>, so there is no content here to wrap — render the <main> from the component mounted into it. — extensions/amp-bodymovin-animation/amp-bodymovin-animation.html:8

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×6) — extensions/amp-access/0.1/amp-login-done.html:272, REDACTED:1101, extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-debug.js:65, …
  • This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close. — extensions/amp-story-interactive/0.1/interactive-disclaimer.js:27

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness5.9 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable. (×2) — extensions/amp-stream-gallery/0.1/amp-stream-gallery.js:424, extensions/amp-stream-gallery/0.1/amp-stream-gallery.js:435

What to do

  • Use valid, non-abstract roles, supply the ARIA state each role requires, and never put aria-hidden on a focusable element.
AC6 · Visual & motion safety5.7 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.pb-overflow button` sets color: #009CFF on background-color: white — 2.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — extensions/amp-playbuzz/0.1/amp-playbuzz.css:12
  • `.swg-smart-button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — third_party/subscriptions-project/swg-button.css:112
  • `.DayPicker_focusRegion` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — third_party/react-dates/_datepicker.css:243
  • `.DateInput_input__focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — third_party/react-dates/_datepicker.css:808
  • `.i-amphtml-stream-gallery-prev` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-stream-gallery/0.1/arrows.css:50
  • `body:not(.amp-mode-keyboard-active) amp-story:not([desktop]) .i-amphtml-story-draggable-drawer-spacer` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-story-page-attachment/0.1/amp-story-draggable-drawer.css:107
  • `.i-amphtml-story-interactive-option` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. (×2) — extensions/amp-story-interactive/0.1/amp-story-interactive-binary-poll.css:34, extensions/amp-story-interactive/0.1/amp-story-interactive-poll.css:29
  • `.i-amphtml-story-interactive-img-option:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-story-interactive/0.1/amp-story-interactive-img.css:66
  • `.i-amphtml-story-interactive-quiz-option` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-story-interactive/0.1/amp-story-interactive-quiz.css:39
  • `.i-amphtml-story-dev-tools-device-dialog-close` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.css:222
  • `.i-amphtml-story-dev-tools-tab-selector` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.css:116
  • `.i-amphtml-story-360-activate-button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-story-360/0.1/amp-story-360.css:20
  • `.i-amphtml-story-button-container` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-story/1.0/pagination-buttons.css:19
  • `amp-selector[disabled] [option]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-selector/0.1/amp-selector.css:22
  • `.i-amphtml-inline-gallery-slide-see-more` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-inline-gallery/0.1/amp-inline-gallery-slide.css:59
  • `.i-amphtml-base-carousel-arrow` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-base-carousel/0.1/amp-base-carousel.css:149
  • `.i-amphtml-carousel-scroll` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-base-carousel/0.1/carousel.css:24
  • `.amp-apester-overflow button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-apester-media/0.1/amp-apester-media.css:45
  • `.aaf-purchase-button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — extensions/amp-access-fewcents/0.1/amp-access-fewcents.css:45
  • `.selector-block[option][selected]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — build-system/server/app-index/main.css:94
  • `content.animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. (×2) — src/bento/components/bento-accordion/1.0/animations.js:38, src/bento/components/bento-accordion/1.0/animations.js:68

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.9 / 10Exemplary✓ Tool-verified

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.

AX2 · Stateful singletons10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

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.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

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.

C2 · Access Controls10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary✓ Tool-verified

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

  • A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface. (×8) — extensions/amp-story-auto-ads/0.1/algorithm-interface.js:19, extensions/amp-story-auto-ads/0.1/algorithm-interface.js:29, extensions/amp-story-auto-ads/0.1/algorithm-interface.js:37, …
  • A placeholder string ("</a> </h3> <div class="a…") is still in shipped code — typical of generated boilerplate that was never filled in. — REDACTED:726
  • A placeholder string ("This is the caption for the first image.…") is still in shipped code — typical of generated boilerplate that was never filled in. (×2) — extensions/amp-lightbox-gallery/1.0/storybook/Basic.js:32, extensions/amp-lightbox-gallery/1.0/storybook/Basic.js:130
  • A placeholder string ("Image 1 long. Lorem Ipsum is simply dumm…") is still in shipped code — typical of generated boilerplate that was never filled in. — extensions/amp-lightbox-gallery/1.0/storybook/Basic.js:150
  • A placeholder string ("Lorem ipsum dolor sit amet, consectetur …") is still in shipped code — typical of generated boilerplate that was never filled in. (×2) — extensions/amp-list/1.0/storybook/Basic.js:70, extensions/amp-pan-zoom/1.0/storybook/Basic.js:13

What to do

  • Finish or delete the functions that still throw "not implemented", and replace placeholder text before shipping.
IC1 · Incompleteness & stubs6.7 / 10Adequate✓ Tool-verified

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

  • `ava` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/ava.js:44
  • `checkRenovateConfig` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/check-renovate-config.js:47
  • `checkSourcemaps` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/check-sourcemaps.js:172
  • `typeCheck` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/check-types.js:31
  • `watchExtension` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/extension-helpers.js:378
  • `finishBundle` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/helpers.js:231
  • `prCheck` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/pr-check.js:25
  • `stopServer` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/serve.js:170
  • `sweepExperiments` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/sweep-experiments/index.js:416
  • `validator` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/validator.js:15
  • `validatorCpp` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/validator.js:26
  • `validatorWebui` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — build-system/tasks/validator.js:52
  • `ensureOrBuildAmpRuntimeInTestMode_` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — REDACTED:669
  • `StoryAdPlacementAlgorithm` has 4 unfinished members out of 4 declared members (methods and accessors, whether or not each carries a body) — a scaffolded class that was never implemented. — extensions/amp-story-auto-ads/0.1/algorithm-interface.js:5
  • `isStoryEligible` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — extensions/amp-story-auto-ads/0.1/algorithm-interface.js:19
  • `initializePages` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — extensions/amp-story-auto-ads/0.1/algorithm-interface.js:29
  • `onPageChange` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — extensions/amp-story-auto-ads/0.1/algorithm-interface.js:37
  • `onNewAdView` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. — extensions/amp-story-auto-ads/0.1/algorithm-interface.js:44
  • The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body. — src/friendly-iframe-embed.js:737
  • `abort` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. (×2) — src/utils/dom-writer.js:134, src/utils/dom-writer.js:272
  • `releaseLock` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it. (×2) — src/utils/dom-writer.js:139, src/utils/dom-writer.js:277
  • `addInstance` has an empty body — confirm it's an intentional no-op and not an unfinished method. — ads/vendors/adventive.js:22
  • A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead. (×11) — ads/vendors/rubicon.js:35, build-system/babel-plugins/babel-plugin-amp-mode-transformer/index.js:1, build-system/babel-plugins/babel-plugin-nomodule-loader/define-template.js:1, …
  • A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something. (×5) — extensions/amp-3d-gltf/0.1/test/test-amp-3d-gltf.js:60, extensions/amp-3d-gltf/0.1/test/test-amp-3d-gltf.js:66, extensions/amp-3d-gltf/0.1/test/test-amp-3d-gltf.js:80, …

What to do

  • Finish or delete the unfinished stubs (functions that throw "not implemented", or whose body is empty or a bare constant) — they are dead surface that looks live.
  • Clear the softer debt: re-enable or delete skipped tests, decide whether each empty function is a deliberate no-op (and say so in a comment), and replace blanket `eslint-disable` / `@ts-nocheck` with targeted, justified suppressions.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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.

M4 · Documentation accuracy2.1 / 10Critical✓ Tool-verified

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.

  • src/compiler/README.md links to `./builders.js`, but `src/compiler/builders.js` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — src/compiler/README.md:4
  • extensions/amp-accordion/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/amp-accordion/1.0/README.md:736
  • extensions/amp-inline-gallery/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/amp-inline-gallery/1.0/README.md:210
  • extensions/amp-stream-gallery/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — extensions/amp-stream-gallery/1.0/README.md:392
  • src/bento/components/bento-accordion/1.0/README.md links to `../../../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — src/bento/components/bento-accordion/1.0/README.md:736
  • src/bento/components/bento-inline-gallery/1.0/README.md links to `../../../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — src/bento/components/bento-inline-gallery/1.0/README.md:210

What to do

  • Reconcile the README with reality: src/compiler/README.md links to `./builders.js`, but `src/compiler/builders.js` does not exist; extensions/amp-accordion/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist; extensions/amp-inline-gallery/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist; extensions/amp-stream-gallery/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist; src/bento/components/bento-accordion/1.0/README.md links to `../../../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

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.

P2 · Observability8.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • `src/preact/storybook/Hooks.js` reports through `console.*` at line 29 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — src/preact/storybook/Hooks.js:29
  • `extensions/amp-app-banner/1.0/storybook/Basic.js` reports through `console.*` at line 7 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — extensions/amp-app-banner/1.0/storybook/Basic.js:7
  • `build-system/server/new-server/transforms/modules/modules-transform.ts` reports through `console.*` at line 78 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — build-system/server/new-server/transforms/modules/modules-transform.ts:78
  • `ads/vendors/affinity.js` reports through `console.*` at line 104 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — ads/vendors/affinity.js:104

What to do

  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
P3 · Security & performance tooling7.0 / 10Strong✓ Tool-verified

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.

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

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.

  • No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.

What to do

  • Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `https.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:93
  • `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×18) — REDACTED:54, REDACTED:201, REDACTED:514, …
  • `http.Client {` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — REDACTED:33

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
  • Give every `http.Client` an explicit `Timeout` (never call `http.Get`/`http.Post` or `http.DefaultClient`, which have none), or build each request with `http.NewRequestWithContext` under a `context.WithTimeout`; add retry with back-off (`hashicorp/go-retryablehttp`) and a breaker (`sony/gobreaker`) around dependencies that fail.
PF3 · Async & latency hygiene6.0 / 10Adequate✓ Tool-verified

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.

  • `fs.readFileSync` in `serveIndex` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/server/app-index/index.js:31
  • `fs.statSync` in `getListing` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/server/app-index/util/listing.js:32
  • `fs.readFileSync` in `app.use("/examples/live-list-update(-reverse)?.amp.html")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:579
  • `fs.readFileSync` in `checkFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:46
  • `fs.existsSync` in `clean` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/clean.js:74
  • `fs.readFileSync` in `compileExpr` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/compile-jison.js:60
  • `fs.statSync` in `callback to filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/dep-check.js:164
  • `fs.existsSync` in `postBuildWebPushPublisherFilesVersion` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/dist.js:282
  • `fs.statSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/firebase.js:19
  • `fs.readFileSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/helpers.js:670
  • `fs.existsSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/helpers.js:674
  • `fs.unlinkSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/helpers.js:675
  • `fs.symlinkSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/helpers.js:677
  • `fs.readFileSync` in `runLinter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/lint.js:36
  • `fs.existsSync` in `getConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:158
  • `fs.readFileSync` in `printErrorWithSuggestedFixes` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/prettify.js:67
  • `fs.writeFileSync` in `printErrorWithSuggestedFixes` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/prettify.js:71
  • `fs.readFileSync` in `runPrettify` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/prettify.js:115
  • `fs.writeFileSync` in `runPrettify` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/prettify.js:119
  • `fs.existsSync` in `prependConfig_` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/release/index.js:460
  • `fs.existsSync` in `page.on("request")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/visual-diff/browser.js:100
  • `fs.readFileSync` in `page.on("request")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — build-system/tasks/visual-diff/browser.js:110
  • `fs.readFileSync` in `performVisualTests` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:648
  • `fs.existsSync` in `ensureOrBuildAmpRuntimeInTestMode_` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:675
  • `fs.readFileSync` in `ensureOrBuildAmpRuntimeInTestMode_` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs. — REDACTED:677

What to do

  • TypeScript/JavaScript: use the promise APIs (fs/promises, a promisified child_process.execFile, the async zlib/crypto functions) and await them instead of the *Sync variants.
R1 · Type Safety10.0 / 10Exemplary✓ 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.

R10 · Code Duplication6.5 / 10Adequate✓ Tool-verified

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.

  • 265 duplicated blocks under extensions/ have copies in at least two of the sibling directories amp-3d-gltf, amp-3q-player, amp-a4a, amp-access, amp-access-fewcents, amp-access-laterpay (+119 more sibling(s) not listed) — 170 of them are reported below, and 95 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 265 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 265 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 265 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:300
  • 53 duplicated blocks under the repository root have copies in at least two of the sibling directories 3p, ads, build-system, extensions, src, testing — 32 of them are reported below, and 21 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 53 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 53 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 53 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — extensions/amp-accordion/1.0/storybook/Basic.js:6
  • 10 duplicated blocks under src/ have copies in at least two of the sibling directories core, inabox, polyfills, preact, service, utils (+1 more sibling(s) not listed) — 8 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — src/core/assert/dev.js:17
  • 5 duplicated blocks under build-system/ have copies in at least two of the sibling directories babel-plugins, compile, eslint-rules, pr-check, release-workflows, task-runner (+1 more sibling(s) not listed) — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — build-system/pr-check/checks.js:46
  • extensions/amp-sidebar/0.1/amp-sidebar.js:1 · extensions/amp-sidebar/0.2/amp-sidebar.js:1 — these 2 files are line-for-line copies of one another — 313 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. — extensions/amp-sidebar/0.1/amp-sidebar.js:1
  • extensions/amp-access-laterpay/0.1/laterpay-impl.js:1 · extensions/amp-access-laterpay/0.2/laterpay-impl.js:1 — these 2 files are line-for-line copies of one another — 256 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. — extensions/amp-access-laterpay/0.1/laterpay-impl.js:1
  • extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:300 · extensions/amp-image-viewer/0.1/amp-image-viewer.js:375 — the two spans are one implementation copied and then locally edited — 1405 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. — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:300
  • extensions/amp-story-auto-ads/0.1/_locales/index.js:1 · extensions/amp-story/1.0/_locales/index.js:1 — these 2 files are line-for-line copies of one another — 139 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. — extensions/amp-story-auto-ads/0.1/_locales/index.js:1
  • extensions/amp-twitter/0.1/storybook/Basic.amp.js:31 · extensions/amp-twitter/1.0/storybook/Basic.amp.js:32 — 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. — extensions/amp-twitter/0.1/storybook/Basic.amp.js:31
  • extensions/amp-sidebar/0.1/swipe-to-dismiss.js:1 · extensions/amp-sidebar/0.2/swipe-to-dismiss.js:1 — these 2 files are line-for-line copies of one another — 122 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. — extensions/amp-sidebar/0.1/swipe-to-dismiss.js:1
  • extensions/amp-brightcove/0.1/amp-brightcove.js:276 · extensions/amp-powr-player/0.1/amp-powr-player.js:197 — the two spans are one implementation copied and then locally edited — 524 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. — extensions/amp-brightcove/0.1/amp-brightcove.js:276
  • src/service/viewport/viewport-binding-ios-embed-wrapper.js:18 · src/service/viewport/viewport-binding-natural.js:14 — the two spans are one implementation copied and then locally edited — 548 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. — src/service/viewport/viewport-binding-ios-embed-wrapper.js:18
  • extensions/amp-viewer-integration/0.1/viewer-initiated-handshake-viewer-for-testing.js:3 · REDACTED:5 — the two spans are one implementation copied and then locally edited — 545 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. — extensions/amp-viewer-integration/0.1/viewer-initiated-handshake-viewer-for-testing.js:3
  • extensions/amp-lightbox/1.0/storybook/Basic.amp.js:103 · extensions/amp-lightbox/1.0/storybook/Basic.amp.js:238 · extensions/amp-lightbox/1.0/storybook/Basic.js:66 · extensions/amp-lightbox/1.0/storybook/Basic.js:213 · +4 more site(s) not listed — the 8 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — 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. — extensions/amp-lightbox/1.0/storybook/Basic.amp.js:103
  • src/gesture-recognizers.js:138 · src/gesture-recognizers.js:523 — the two spans are one implementation copied and then locally edited — 501 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. — src/gesture-recognizers.js:138
  • extensions/amp-access/0.1/amp-access-server-jwt.js:30 · extensions/amp-access/0.1/amp-access-server.js:16 — the two spans are one implementation copied and then locally edited — 535 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. — extensions/amp-access/0.1/amp-access-server-jwt.js:30
  • extensions/amp-analytics/0.1/linker.js:4 · extensions/amp-consent/0.1/linker.js:4 — these 2 files are line-for-line copies of one another — 81 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. — extensions/amp-analytics/0.1/linker.js:4
  • extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:99 · extensions/amp-image-viewer/0.1/amp-image-viewer.js:78 — the two spans are one implementation copied and then locally edited — 441 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. — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:99
  • extensions/amp-brightcove/0.1/amp-brightcove.js:80 · extensions/amp-powr-player/0.1/amp-powr-player.js:60 — the two spans are one implementation copied and then locally edited — 404 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. — extensions/amp-brightcove/0.1/amp-brightcove.js:80
  • REDACTED:37 · REDACTED:42 — the two spans are one implementation copied and then locally edited — 366 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:37
  • extensions/amp-a4a/0.1/amp-a4a.js:2244 · extensions/amp-a4a/0.1/amp-ad-utils.js:45 — the two spans are one implementation copied and then locally edited — 394 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. — extensions/amp-a4a/0.1/amp-a4a.js:2244
  • extensions/amp-accordion/1.0/storybook/Basic.js:6 · src/bento/components/bento-accordion/1.0/storybook/Basic.js:6 — these 2 files are line-for-line copies of one another — 72 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. — extensions/amp-accordion/1.0/storybook/Basic.js:6
  • REDACTED:192 · REDACTED:189 — 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. — REDACTED:192
  • extensions/amp-analytics/0.1/cookie-writer.js:88 · extensions/amp-consent/0.1/cookie-writer.js:81 — the two spans are one implementation copied and then locally edited — 374 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. — extensions/amp-analytics/0.1/cookie-writer.js:88
  • extensions/amp-ad-network-doubleclick-impl/0.1/flexible-ad-slot-utils.js:1 · extensions/amp-ad-network-valueimpression-impl/0.1/flexible-ad-slot-utils.js:1 — these 2 files are line-for-line copies of one another — 62 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. — extensions/amp-ad-network-doubleclick-impl/0.1/flexible-ad-slot-utils.js:1
  • extensions/amp-sidebar/0.1/toolbar.js:1 · extensions/amp-sidebar/0.2/toolbar.js:1 — these 2 files are line-for-line copies of one another — 59 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. — extensions/amp-sidebar/0.1/toolbar.js:1
  • REDACTED:248 · REDACTED:218 — 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. — REDACTED:248
  • src/core/assert/dev.js:40 · src/core/assert/user.js:28 — the two spans are one implementation copied and then locally edited — 99 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row'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. — src/core/assert/dev.js:40
  • extensions/amp-facebook-comments/0.1/amp-facebook-comments.js:1 · extensions/amp-facebook-like/0.1/amp-facebook-like.js:1 · extensions/amp-facebook-page/0.1/amp-facebook-page.js:1 — these 3 files are line-for-line copies of one another — 56 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. — extensions/amp-facebook-comments/0.1/amp-facebook-comments.js:1
  • extensions/amp-accordion/1.0/storybook/Basic.amp.js:1 · src/bento/components/bento-accordion/1.0/storybook/Basic.amp.js:1 — these 2 files are line-for-line copies of one another — 52 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. — extensions/amp-accordion/1.0/storybook/Basic.amp.js:1
  • extensions/amp-experiment/0.1/amp-experiment.js:11 · extensions/amp-experiment/1.0/amp-experiment.js:19 — the two spans are one implementation copied and then locally edited — 258 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. — extensions/amp-experiment/0.1/amp-experiment.js:11
  • extensions/amp-lightbox/1.0/amp-lightbox.js:21 · extensions/amp-sidebar/1.0/amp-sidebar.js:14 — the two spans are one implementation copied and then locally edited — 302 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. — extensions/amp-lightbox/1.0/amp-lightbox.js:21
  • extensions/amp-story-interactive/0.1/amp-story-interactive-img-quiz.js:76 · extensions/amp-story-interactive/0.1/amp-story-interactive-quiz.js:73 — the two spans are one implementation copied and then locally edited — 240 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. — extensions/amp-story-interactive/0.1/amp-story-interactive-img-quiz.js:76
  • ads/google/a4a/shared/url-builder.js:15 · extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:513 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — ads/google/a4a/shared/url-builder.js:15
  • extensions/amp-base-carousel/0.1/dimensions.js:105 · src/bento/components/bento-base-carousel/1.0/dimensions.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. — extensions/amp-base-carousel/0.1/dimensions.js:105
  • extensions/amp-lightbox-gallery/1.0/amp-lightbox-gallery.js:25 · extensions/amp-lightbox/1.0/amp-lightbox.js:21 — the two spans are one implementation copied and then locally edited — 261 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. — extensions/amp-lightbox-gallery/1.0/amp-lightbox-gallery.js:25
  • extensions/amp-timeago/1.0/storybook/Basic.js:68 · extensions/amp-timeago/1.0/storybook/Basic.js:114 — 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. — extensions/amp-timeago/1.0/storybook/Basic.js:68
  • ads/vendors/adskeeper.js:23 · ads/vendors/idealmedia.js:7 · ads/vendors/mgid.js:7 — 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. — ads/vendors/adskeeper.js:23
  • extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.js:86 · extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.js:140 — 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. — extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.js:86
  • REDACTED:258 · REDACTED:278 · REDACTED:244 — 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. — REDACTED:258

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.
R11 · Import Boundaries8.4 / 10Strong✓ Tool-verified

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.

  • build-system/babel-plugins/babel-plugin-transform-log-methods/index.js:34 imports base62/lib/ascii, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — build-system/babel-plugins/babel-plugin-transform-log-methods/index.js:34
  • build-system/compile/json-schema/index.js:6 imports ajv-formats/dist/formats, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — build-system/compile/json-schema/index.js:6
  • build-system/compile/json-schema/index.js:8 imports ajv/dist/standalone, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — build-system/compile/json-schema/index.js:8
  • build-system/eslint-rules/core-dom-jsx.js:4 reaches into another package with a relative path (../../node_modules/eslint/lib/rules/utils/ast-utils) — import the package by name instead. — build-system/eslint-rules/core-dom-jsx.js:4
  • build-system/eslint-rules/no-forbidden-terms.js:2 imports build-system/test-configs/forbidden-terms.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/eslint-rules/no-forbidden-terms.js:2
  • build-system/eslint-rules/no-global.js:3 reaches into another package with a relative path (../../node_modules/eslint/lib/rules/utils/ast-utils) — import the package by name instead. — build-system/eslint-rules/no-global.js:3
  • build-system/pr-check/build-targets.js:8 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/pr-check/build-targets.js:8
  • build-system/pr-check/e2e-tests.js:14 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/pr-check/e2e-tests.js:14
  • build-system/pr-check/experiment-e2e-tests.js:13 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/pr-check/experiment-e2e-tests.js:13
  • build-system/pr-check/unit-tests.js:16 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/pr-check/unit-tests.js:16
  • build-system/tasks/check-invalid-whitespaces.js:6 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/check-invalid-whitespaces.js:6
  • build-system/tasks/check-links.js:9 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/check-links.js:9
  • build-system/tasks/compile-jison.js:7 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/compile-jison.js:7
  • build-system/tasks/dep-check.js:3 imports build-system/test-configs/dep-check-config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/dep-check.js:3
  • build-system/tasks/e2e/describes-e2e.js:18 reaches past another workspace package's public entry into its internals with a relative path (../../../testing/helpers) — 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. — build-system/tasks/e2e/describes-e2e.js:18
  • build-system/tasks/e2e/describes-e2e.js:19 reaches past another workspace package's public entry into its internals with a relative path (../serve) — 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. — build-system/tasks/e2e/describes-e2e.js:19
  • build-system/tasks/e2e/describes-e2e.js:21 reaches past another workspace package's public entry into its internals with a relative path (../../common/ci) — 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. — build-system/tasks/e2e/describes-e2e.js:21
  • build-system/tasks/e2e/index.js:15 reaches past another workspace package's public entry into its internals with a relative path (../../common/utils) — 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. — build-system/tasks/e2e/index.js:15
  • build-system/tasks/e2e/index.js:19 reaches past another workspace package's public entry into its internals with a relative path (../../common/ctrlcHandler) — 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. — build-system/tasks/e2e/index.js:19
  • build-system/tasks/e2e/index.js:21 reaches past another workspace package's public entry into its internals with a relative path (../../common/exec) — 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. — build-system/tasks/e2e/index.js:21
  • build-system/tasks/e2e/index.js:22 reaches past another workspace package's public entry into its internals with a relative path (../serve) — 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. — build-system/tasks/e2e/index.js:22
  • build-system/tasks/e2e/index.js:23 reaches past another workspace package's public entry into its internals with a relative path (../../common/ci) — 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. — build-system/tasks/e2e/index.js:23
  • build-system/tasks/e2e/index.js:24 reaches past another workspace package's public entry into its internals with a relative path (../../common/logging) — 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. — build-system/tasks/e2e/index.js:24
  • build-system/tasks/e2e/index.js:25 reaches past another workspace package's public entry into its internals with a relative path (../helpers) — 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. — build-system/tasks/e2e/index.js:25
  • build-system/tasks/helpers.js:21 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/helpers.js:21
  • build-system/tasks/lint.js:14 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/lint.js:14
  • build-system/tasks/presubmit.js:5 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/presubmit.js:5
  • build-system/tasks/presubmit.js:9 imports build-system/test-configs/forbidden-terms.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/presubmit.js:9
  • build-system/tasks/prettify.js:24 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/prettify.js:24
  • build-system/tasks/sweep-experiments/index.js:7 imports build-system/test-configs/jscodeshift/index.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/sweep-experiments/index.js:7
  • build-system/tasks/validate-html-fixtures.js:14 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on. — build-system/tasks/validate-html-fixtures.js:14
  • extensions/amp-access/0.1/amp-access-iframe.js:10 reaches into another package with a relative path (./iframe-api/messenger) — import the package by name instead. — extensions/amp-access/0.1/amp-access-iframe.js:10
  • extensions/amp-access/0.1/iframe-api/amp-iframe-api-export.js:6 reaches into another package with a relative path (../../../../src/polyfills) — import the package by name instead. — extensions/amp-access/0.1/iframe-api/amp-iframe-api-export.js:6
  • extensions/amp-access/0.1/test/test-amp-access-iframe.js:6 reaches past another workspace package's public entry into its internals with a relative path (../iframe-api/messenger) — 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. — extensions/amp-access/0.1/test/test-amp-access-iframe.js:6
  • extensions/amp-access/0.1/test/test-iframe-api.js:1 reaches past another workspace package's public entry into its internals with a relative path (../iframe-api/access-controller) — 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. — extensions/amp-access/0.1/test/test-iframe-api.js:1
  • extensions/amp-access/0.1/test/test-iframe-api.js:2 reaches past another workspace package's public entry into its internals with a relative path (../iframe-api/iframe-api) — 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. — extensions/amp-access/0.1/test/test-iframe-api.js:2
  • extensions/amp-access/0.1/test/test-iframe-messenger.js:1 reaches past another workspace package's public entry into its internals with a relative path (../iframe-api/messenger) — 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. — extensions/amp-access/0.1/test/test-iframe-messenger.js:1
  • extensions/amp-script/0.1/amp-script.js:1 imports @ampproject/worker-dom/dist/amp-production/main.mjs, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — extensions/amp-script/0.1/amp-script.js:1
  • extensions/amp-subscriptions/0.1/local-subscription-platform-iframe.js:12 reaches into another package with a relative path (../../amp-access/0.1/iframe-api/messenger) — import the package by name instead. — extensions/amp-subscriptions/0.1/local-subscription-platform-iframe.js:12
  • extensions/amp-subscriptions/0.1/test/test-local-subscriptions-iframe-platform.js:3 reaches past another workspace package's public entry into its internals with a relative path (../../../amp-access/0.1/iframe-api/messenger) — 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. — extensions/amp-subscriptions/0.1/test/test-local-subscriptions-iframe-platform.js:3

What to do

  • Fix the listed violations: import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (29 rows); move the shared test helper into a source directory production code may depend on (17 rows).
R2 · Cyclomatic Complexity8.0 / 10Strong✓ Tool-verified

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.

  • discoverWork_ has cyclomatic complexity 66 and cognitive complexity 84; 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. — src/service/resources-impl.js:1048
  • eval_ has cyclomatic complexity 59 and cognitive complexity 60; 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. — extensions/amp-bind/0.1/bind-expression.js:325
  • getErrorReportData has cyclomatic complexity 46 and cognitive complexity 51; 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. — src/error-reporting.js:490
  • mutateWork_ has cyclomatic complexity 43 and cognitive complexity 80; 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. — src/service/resources-impl.js:712
  • getEffectiveLayoutInternal has cyclomatic complexity 38 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 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. — src/core/static-layout.js:238
  • startTag has cyclomatic complexity 36 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. — src/sanitizer.js:88
  • (anonymous) has cyclomatic complexity 34 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. — extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:244
  • onMessage_ has cyclomatic complexity 34 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. — extensions/amp-slikeplayer/0.1/amp-slikeplayer.js:307
  • next_ has cyclomatic complexity 32 and cognitive complexity 52; 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. — src/service/action-impl.js:1276
  • getAdUrl has cyclomatic complexity 32 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. — extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:279
  • (anonymous) has cyclomatic complexity 31 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. — src/core/dom/media-query-props.js:131
  • onMessage has cyclomatic complexity 30 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 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:1375
  • mergeShadowHead_ has cyclomatic complexity 29 and cognitive complexity 57; 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. — src/multidoc-manager.js:317
  • evaluateNextLevel has cyclomatic complexity 27 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — 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. — src/service/url-expander/expander.js:144
  • onMessage_ has cyclomatic complexity 27 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 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:452
  • pseudo has cyclomatic complexity 26 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. — extensions/amp-animation/0.1/test/test-css-expr-parser.js:21
  • parsePropDefs has cyclomatic complexity 25 and cognitive complexity 49; 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. — src/preact/parse-props.js:167
  • rerender_ has cyclomatic complexity 25 and cognitive complexity 40; 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. — src/preact/base-element.js:611
  • applyBinding_ has cyclomatic complexity 25 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. — extensions/amp-bind/0.1/bind-impl.js:1306
  • reportError has cyclomatic complexity 24 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. — src/error-reporting.js:154
  • updateVisibilityState_ has cyclomatic complexity 24 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — 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. — src/service/ampdoc-impl.js:567
  • registerScript_ has cyclomatic complexity 23 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. — extensions/amp-ad-network-fake-impl/0.1/external-reorder-head-transformer.js:130
  • parseActionMap 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. — src/service/action-impl.js:949
  • measure has cyclomatic complexity 22 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. — src/service/fixed-layer.js:418
  • isValidAttr has cyclomatic complexity 22 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. — src/purifier/sanitation.js:363
  • getBlockParameters_ has cyclomatic complexity 22 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. — REDACTED:689
  • createKeyframes_ has cyclomatic complexity 21 and cognitive complexity 46; 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. — extensions/amp-animation/0.1/web-animations.js:463
  • experimentToggles has cyclomatic complexity 21 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. — src/experiments/index.js:114
  • connectedCallback has cyclomatic complexity 21 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. — src/custom-element.js:1148
  • onDocumentFormSubmit_ has cyclomatic complexity 21 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. — src/document-submit.js:36
  • prCheck has cyclomatic complexity 21 and cognitive complexity 21; 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. — build-system/tasks/pr-check.js:25
  • (anonymous) has cyclomatic complexity 21 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. — ads/google/a4a/utils.js:297
  • videonow has cyclomatic complexity 21 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 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. — ads/vendors/videonow.js:10
  • hoistProperties has cyclomatic complexity 20 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. — build-system/compile/json-schema/index.js:273
  • checkStaticEnumUse has cyclomatic complexity 20 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. — build-system/eslint-rules/enums.js:91
  • applyStaticLayout has cyclomatic complexity 20 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. — src/core/static-layout.js:100
  • ThisExpression has cyclomatic complexity 20 and cognitive complexity 22; 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. — build-system/eslint-rules/no-invalid-this.js:38
  • buildCallback has cyclomatic complexity 19 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 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:332
  • getAmpAdMetadata 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. — extensions/amp-a4a/0.1/amp-a4a.js:2244
  • findCountry_ 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. — extensions/amp-geo/0.1/amp-geo.js:181
R3 · Large Files7.0 / 10Strong✓ 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.

  • extensions/amp-story/1.0/amp-story.js has 2533 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-story/1.0/amp-story.js:1
  • extensions/amp-a4a/0.1/amp-a4a.js has 2494 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-a4a/0.1/amp-a4a.js:1
  • src/custom-element.js has 2037 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/custom-element.js:1
  • REDACTED has 1962 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 1830 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
  • src/amp-story-player/amp-story-player-impl.js has 1795 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/amp-story-player/amp-story-player-impl.js:1
  • REDACTED has 1737 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
  • extensions/amp-bind/0.1/bind-impl.js has 1720 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-bind/0.1/bind-impl.js:1
  • src/service/resources-impl.js has 1654 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/resources-impl.js:1
  • extensions/amp-analytics/0.1/events.js has 1625 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-analytics/0.1/events.js:1
  • REDACTED has 1586 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
  • extensions/amp-list/0.1/amp-list.js has 1563 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-list/0.1/amp-list.js:1
  • extensions/amp-form/0.1/amp-form.js has 1531 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-form/0.1/amp-form.js:1
  • extensions/amp-video-docking/0.1/amp-video-docking.js has 1497 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-video-docking/0.1/amp-video-docking.js:1
  • REDACTED has 1476 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
  • src/service/video-manager-impl.js has 1390 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/video-manager-impl.js:1
  • ads/_config.js has 1323 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ads/_config.js:1
  • extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js has 1310 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:1
  • src/service/action-impl.js has 1297 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/action-impl.js:1
  • REDACTED has 1283 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
  • extensions/amp-animation/0.1/parsers/css-expr-ast.js has 1280 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-animation/0.1/parsers/css-expr-ast.js:1
  • extensions/amp-base-carousel/0.1/carousel.js has 1220 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-base-carousel/0.1/carousel.js:1
  • extensions/amp-animation/0.1/web-animations.js has 1214 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-animation/0.1/web-animations.js:1
  • build-system/test-configs/forbidden-terms.js has 1149 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — build-system/test-configs/forbidden-terms.js:1
  • src/service/url-replacements-impl.js has 1135 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/url-replacements-impl.js:1
  • src/service/viewport/viewport-impl.js has 1125 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/viewport/viewport-impl.js:1
  • extensions/amp-image-lightbox/0.1/amp-image-lightbox.js has 1110 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:1
  • extensions/amp-story/1.0/page-advancement.js has 1082 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-story/1.0/page-advancement.js:1
  • src/service/fixed-layer.js has 1056 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/fixed-layer.js:1
  • src/service/history-impl.js has 1041 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/history-impl.js:1
  • extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js has 1037 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js:1
  • REDACTED has 1006 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
  • extensions/amp-carousel/0.1/slidescroll.js has 1002 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-carousel/0.1/slidescroll.js:1
  • ads/google/a4a/utils.js has 995 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — ads/google/a4a/utils.js:1
  • src/base-element.js has 979 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/base-element.js:1
  • src/service/ampdoc-impl.js has 974 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/service/ampdoc-impl.js:1
  • extensions/amp-video/0.1/amp-video.js has 972 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-video/0.1/amp-video.js:1
  • extensions/amp-consent/0.1/amp-consent.js has 969 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-consent/0.1/amp-consent.js:1
  • extensions/amp-story/1.0/media-pool.js has 963 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-story/1.0/media-pool.js:1
  • extensions/amp-web-push/0.1/web-push-service.js has 952 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — extensions/amp-web-push/0.1/web-push-service.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage5.3 / 10Adequate✓ 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.

  • build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/input.mjs:2 imports '../ANYWHERE_THAT_LEADS_TO/core/dom/jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/input.mjs:2
  • build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/output.mjs:2 imports '../ANYWHERE_THAT_LEADS_TO/core/dom/jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/output.mjs:2
  • build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/export-from/input.mjs:1 imports './abc', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/export-from/input.mjs:1
  • build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/imports-and-exports/input.mjs:1 imports './foo', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/imports-and-exports/input.mjs:1
  • build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/single-import-name/input.mjs:1 imports './foo', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/single-import-name/input.mjs:1
  • build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs:7 imports './foo.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs:7
  • build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs:1 imports './bar.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (3 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs:1
  • build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs:1 imports '../foo.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs:1
  • build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs:1 imports '../foo.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (8 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs:1
  • build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs:1 imports './core/data-structures/promise', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs: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. (×30) — extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:1, extensions/amp-sidebar/1.0/storybook/Basic.amp.js:1, 3p/integration.js:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness7.7 / 10Strong✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R7 · Dead Code6.0 / 10Adequate✓ 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.

  • 2 file(s) (~83 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. — build-system/tasks/storybook/env/amp
  • 2 file(s) (~91 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. — build-system/tasks/storybook/env/preact
  • 2 file(s) (~134 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. — build-system/tasks/storybook/env/react
  • Unreachable from the 405 application, 71 tooling and 1196 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (405 application, 71 tooling, 1196 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 (×27) — build-system/externs/amp.extern.js, extensions/amp-image-viewer/0.1/amp-image-viewer.js, extensions/amp-image-slider/0.1/amp-image-slider.js, …
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (testing/init-tests-helpers.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 — testing/describes.js
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.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 (×2) — extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js, extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-debug.js
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/bento/components/bento-autocomplete/1.0/component.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 — src/bento/components/bento-autocomplete/1.0/component/component.tsx
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/amp-access-scroll/0.1/amp-access-scroll.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 — extensions/amp-access-scroll/0.1/scroll-impl.js
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/amp-inline-gallery/0.1/amp-inline-gallery-captions.js, extensions/amp-inline-gallery/0.1/amp-inline-gallery.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 — extensions/amp-inline-gallery/0.1/amp-inline-gallery-pagination.js
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/amp-inline-gallery/0.1/amp-inline-gallery.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 — extensions/amp-inline-gallery/0.1/amp-inline-gallery-thumbnails.js
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (testing/init-tests.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 — testing/init-tests-helpers.js
  • no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (testing/async-errors.js, testing/init-tests-helpers.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 — testing/console-logging-setup.js

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene0.0 / 10Critical✓ Tool-verified

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 but not declared in any reachable REDACTED — installs work only by hoisting accident. (×6) — build-system/babel-plugins/babel-plugin-nomodule-loader/index.js:13, build-system/tasks/get-zindex/js.js:2, build-system/babel-plugins/babel-plugin-deep-pure/index.js:42, …
  • Imported only as a TYPE and declared in no reachable REDACTED. 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 REDACTED. — build-system/compile/json-schema/index.js:271
  • Declared in build-system/tasks/visual-diff/REDACTED 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.
  • Declared in validator/REDACTED 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)
  • Declared in validator/js/webui/REDACTED 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. (×30)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports4.6 / 10Weak✓ Tool-verified

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.

  • extensions/amp-consent/0.1/consent-config.js → extensions/amp-consent/0.1/consent-state-manager.js → extensions/amp-consent/0.1/consent-config.js — extensions/amp-consent/0.1/consent-config.js:11
  • extensions/amp-story-shopping/0.1/amp-story-shopping-attachment.js → extensions/amp-story-shopping/0.1/amp-story-shopping.js → extensions/amp-story-shopping/0.1/amp-story-shopping-attachment.js (one verified cycle inside a mutually-dependent group of 3 files) — extensions/amp-story-shopping/0.1/amp-story-shopping-attachment.js:11
  • src/bento/components/bento-base-carousel/1.0/component.js → src/bento/components/bento-base-carousel/1.0/scroller.js → src/bento/components/bento-lightbox-gallery/1.0/component.js → src/bento/components/bento-lightbox-gallery/1.0/provider.js → src/bento/components/bento-base-carousel/1.0/component.js — src/bento/components/bento-base-carousel/1.0/component.js:33

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture6.0 / 10Adequate✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript 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. Markup this repository SHIPS is scored for third-party script integrity whether or not the repository serves it itself, since a page handed to a consumer runs in that consumer’s origin. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.

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+ (`createHash("sha256")`) 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. (×2) — build-system/common/esbuild-babel.js:205, build-system/common/transform-cache.js:81
  • `https://cdn.ampproject.org/v0.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 34 such include(s) across the repository's markup. — REDACTED:68

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 2 sites, not one: `build-system/common/esbuild-babel.js:205` (createHash("sha1")), `build-system/common/transform-cache.js:81` (createHash("md5")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Pin third-party scripts and verify them: name an exact version in the URL and add an `integrity="sha384-…"` hash alongside `crossorigin="anonymous"` (both are required — an integrity hash on a cross-origin script without `crossorigin` is not evaluated, it blocks the script). Where the vendor ships a continuously-updated loader and publishes no stable hash (tag managers, analytics, chat widgets), Subresource Integrity is not available: constrain it instead with a `Content-Security-Policy` that names the exact origins allowed to execute, and drop the script from the pages that do not need it. Where the page is shipped inside a package that others host, prefer vendoring the asset and serving it from the app’s own origin, so no consumer inherits a third-party dependency they did not choose.
X1 · Async correctness7.9 / 10Strong✓ Tool-verified

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.

  • The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. — testing/helpers/index.js:59

What to do

  • `async` Promise executor
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document1.8 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `objectsEqualDeep` is exported and takes `o1: object` from its caller, and it calls itself at line 165 (`objectsEqualDeep`) with a piece of `o1` (and at line 175) — and nowhere in `objectsEqualDeep` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `objectsEqualDeep` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/core/types/object/index.js:165
  • `recreateNonProtoObject` is exported and takes `obj: object` from its caller, and it calls itself at line 210 (`recreateNonProtoObject`) with a piece of `obj` — and nowhere in `recreateNonProtoObject` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `recreateNonProtoObject` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/core/types/object/index.js:210
  • `eval_` is exported and takes `scope: object` from its caller, and it calls itself at line 538 (`this.eval_`) with a piece of `scope` — and nowhere in `eval_` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `eval_` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — extensions/amp-bind/0.1/bind-expression.js:538
  • `buildVendorConfigs` is exported and takes `options: object` from its caller, and it calls itself at line 40 (`buildVendorConfigs`) with a piece of `options` — and nowhere in `buildVendorConfigs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `buildVendorConfigs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — build-system/tasks/3p-vendor-helpers.js:40
  • `ajvCompile` is exported, takes a document from its caller (line 128) and hands it to `addCustomValidatorsToSchema`, which calls itself at line 87 (`addCustomValidatorsToSchema`) with a piece of `schema` (and at line 95) — and nowhere in `addCustomValidatorsToSchema` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `addCustomValidatorsToSchema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — build-system/compile/json-schema/index.js:87

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation5.4 / 10Adequate✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 3/13 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `checkFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:39
  • `fetchAmpSw_` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — build-system/tasks/release/index.js:304
  • `skipBundleSize` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — build-system/tasks/bundle-size/index.js:146
  • `addComment` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — build-system/status-page/comment.js:32
  • `createIncident` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — build-system/status-page/incident.js:39
  • `getIncident` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — build-system/status-page/incident.js:74
  • `updateIncident` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — build-system/status-page/incident.js:96
  • `passthroughServeModeCdn` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:49
  • `requestAmphtmlDocUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — REDACTED:197
  • `requestFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — build-system/server/routes/a4a-envelopes.js:127

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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.

X24 · Document value interpolated into markup unescaped4.5 / 10Weak✓ Tool-verified

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

  • `'<'+'script>__runScript'+index+'()<'+'/script>'` is text this program did not author, and it is written into the text of an element through `document.write` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — 3p/3p.js:124
  • `embedId` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — ads/vendors/insticator.js:30
  • `global.context.container` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — ads/vendors/jioads.js:60
  • `data['adspot']` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — ads/vendors/jioads.js:61
  • `data['pkgName']` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — ads/vendors/jioads.js:62
  • `data.id` is text this program did not author, and it is written into a script or style context through `document.write` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. — ads/vendors/pubfuture.js:13
  • `req.query.body` is text this program did not author, and it is written into the text of an element through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:72
  • `node.outerHTML.replace(new RegExp(`^\<${tagName}`,'i'),`<${withTagName}`).replace(new RegExp(`\</${tagName}\>$`,'i'),…` is text this program did not author, and it is written into the text of an element through `outerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — build-system/server/app-video-testbench.js:271
  • `withTagName` is text this program did not author, and it is written into an unquoted attribute through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — build-system/server/app-video-testbench.js:273
  • `newMode` is text this program did not author, and it is written into the text of an element through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:125, REDACTED:127
  • `fields['name']` is text this program did not author, and it is written into the text of an element through `res.end` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:303, REDACTED:308
  • `fields['email']` is text this program did not author, and it is written into the text of an element through `res.end` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:304, REDACTED:309
  • `req.url.substr(7)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — REDACTED:904
  • `message` is text this program did not author, and it is written into a script or style context through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute. (×2) — REDACTED:946, REDACTED:947
  • `filePath` is text this program did not author, and it is written into an unquoted attribute through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value. — REDACTED:1552
  • `escapeHtml(url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path. — extensions/amp-a4a/0.1/secure-frame.js:42
  • `renderedElement.innerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/amp-ad-network-adzerk-impl/0.1/amp-ad-network-adzerk-impl.js:183
  • `JSON.stringify(spec)` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:64
  • `html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — REDACTED:1830, src/bento/components/bento-autocomplete/1.0/base-element.js:77
  • `content` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — REDACTED:36
  • `template.innerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/amp-render/1.0/amp-render.js:59
  • `policy.createHTML('ignored')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. (×2) — extensions/amp-story/1.0/semantic-render.js:164, src/core/dom/static-template.js:99
  • `text` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/amp-story/1.0/semantic-render.js:166
  • `decryptedContent` is text this program did not author, and it is written into the text of an element through `outerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — extensions/amp-subscriptions/0.1/crypto-handler.js:121
  • `strings[0]` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/core/dom/static-template.js:101
  • `policy.createHTML('')` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/shadow-embed.js:53

What to do

  • Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

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.

X3 · Exception handling5.1 / 10Adequate✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×2) — REDACTED:85, REDACTED:94
  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×24) — src/ad-helper.js:97, src/cookies.js:207, src/cookies.js:289, …
  • `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×10) — src/error-reporting.js:356, src/service-helpers.js:639, src/core/dom/video/index.js:119, …
  • `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. (×3) — src/impression.js:92, src/validator-integration.js:72, extensions/amp-story/1.0/amp-story.js:2195
  • `.then(…, noop)` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it. — src/utils/log.js:148

What to do

  • Swallowed exception (caught, then discarded)
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.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `REDACTED` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

X5 · Nullable reference types7.9 / 10Strong✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • ~5.3 `!` null assertions per 1k TypeScript source lines — 26 assertion(s) across the 4947 source line(s) of the 61 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/bento/components/bento-autocomplete/1.0/component/component.tsx (7), extensions/amp-pan-zoom/1.0/component-ts.tsx (4), extensions/amp-date-picker/1.0/component/date-range-picker.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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.

LensScoreRatingImpact
Code Health62%AdequateAcceptable, with room to improve.
Architecture81%StrongStrongest area.
Maturity45%Weak — gated by D34, M2, M4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness38%Weak — gated by D13, R8, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security67%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility27%Weak — gated by AC1, AC3, AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance60%AdequateAcceptable, with room to improve.
Unscored — 4 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 — 2 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.
  • X6 Hand-rolled structured-format parsing — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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
  • P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 43 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.

  • AX1 Captive dependencies — 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
  • 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
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • 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 serve`) exited before it served a page. Likely cause (the repository): REDACTED has no "serve" script, so `npm run serve` could not start the app. Last output: "npm error Missing script: "serve" / 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, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend 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, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D11 Test Reliability — Test reliability not measured — JavaScript/TypeScript suite did not run
  • 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.
  • D19 Documentation Quality — D19 withholds "Documentation: empty section": 4 candidate(s) were measured and not published.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed JavaScript 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 — no ADRs to check
  • D26 Project Cohesion — D26 measured no build unit over this repository's .cc, .go, .ts, .tsx source. 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) — 10 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • 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.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — validator/js/gulpjs/ runs mocha but declares no coverage provider, so the suite can run and still produce no lcov — add `c8` (or `nyc`) as a devDependency so the suite can be wrapped for coverage. 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 — not scored — this repository shows none of the 2 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • 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 REDACTED, 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.
  • R6 Tooling — no REDACTED in the repository — test/lint/typecheck wiring is read from REDACTED scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • 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
  • X27 Collection changed while being enumerated — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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.
  • 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.

Critical — 183 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×79
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 54 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC3 · Page structure · <html> without a lang · ×12
  • <html> without a lang 3p/frame.max.html:1 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang 3p/recaptcha.max.html:1 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang REDACTED:1 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang REDACTED:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang build-system/server/shadow-viewer.js:133 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang extensions/amp-access/0.1/amp-login-done.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang extensions/amp-ad-network-fake-impl/0.1/data/fake_amp.html:1 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang extensions/amp-ad-network-fake-impl/0.1/data/fake_amp_ad_with_html_attr.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang extensions/amp-ad-network-fake-impl/0.1/data/fake_amp_ad_with_iframe_transport.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang extensions/amp-ad-network-fake-impl/0.1/data/fake_amp_visibilityspec.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang extensions/amp-web-push/0.1/amp-web-push-permission-dialog.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang testing/describes.js:609 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
D30 · Dependency Vulnerabilities · Critical CVE · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <button> with no accessible text · ×7
  • <button> with no accessible text REDACTED:261 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:174 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:205 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text extensions/amp-story-education/0.1/amp-story-education.js:42 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text extensions/amp-story-interactive/0.1/amp-story-interactive-img-poll.js:22 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text extensions/amp-story-interactive/0.1/amp-story-interactive-img-quiz.js:34 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
  • <button> with no accessible text extensions/amp-story-interactive/0.1/amp-story-interactive-quiz.js:42 — A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one).
AC3 · Page structure · Document without a <title> · ×7
  • Document without a <title> 3p/frame.max.html:1 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> 3p/recaptcha.max.html:1 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> REDACTED:1 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> extensions/amp-ad-network-fake-impl/0.1/data/fake_amp.html:1 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> extensions/amp-ad-network-fake-impl/0.1/data/fake_amp_visibilityspec.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> extensions/amp-iframe/0.1/storybook/iframe.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
  • Document without a <title> extensions/amp-web-push/0.1/amp-web-push-permission-dialog.html:2 — A page with no <title> gives no name in the tab, history or screen-reader page list. Add a descriptive <title> in <head>.
D10 · Test Quality · No assertions (empty test) · ×7
  • No assertions (empty test): should resolve trackImpressionPromise after timeout test/unit/test-impression.js:79 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): delay test/unit/test-timer.js:23 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): should update fragment test/unit/core/window/test-history.js:287 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): should NOT update fragment of the viewer on Virtual test/unit/core/window/test-history.js:1187 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): should hide fallback element on fetch success extensions/amp-list/0.1/test/test-amp-list.js:978 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): should hide placeholder and show fallback on fetch failure extensions/amp-list/0.1/test/test-amp-list.js:990 — Test method has an empty body — it asserts nothing and exercises no code.
  • No assertions (empty test): should pass dummy test extensions/amp-image-slider/0.1/test/test-amp-image-slider.js:9 — Test method has an empty body — it asserts nothing and exercises no code.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC1 · Text alternatives · <img> without a text alternative · ×4
  • <img> without a text alternative REDACTED:244 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:229 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative REDACTED:1102 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
  • <img> without a text alternative testing/local-amp-chrome-extension/popup.html:126 — An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative.
D28 · Secrets (history) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <input> without a programmatic label · ×2
  • <input> without a programmatic label build-system/server/app-index/proxy-form.js:9 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label extensions/amp-story-interactive/0.1/amp-story-interactive-slider.js:29 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
AC3 · Page structure · <iframe> without a title · ×2
  • <iframe> without a title REDACTED:904 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
  • <iframe> without a title REDACTED:29 — An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label.
AC5 · ARIA correctness · aria-hidden on a focusable element · ×2
  • aria-hidden on a focusable element extensions/amp-stream-gallery/0.1/amp-stream-gallery.js:424 — aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable.
  • aria-hidden on a focusable element extensions/amp-stream-gallery/0.1/amp-stream-gallery.js:435 — aria-hidden="true" hides the element from assistive tech but leaves it keyboard-focusable — a confusing dead stop. Remove aria-hidden or make the element non-focusable.
D13 · REDACTED Scanning · Leaked secret · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
R9 · Circular Imports · Import cycle (2 files) · ×2
  • Import cycle (2 files) extensions/amp-consent/0.1/consent-config.js:11 — extensions/amp-consent/0.1/consent-config.js → extensions/amp-consent/0.1/consent-state-manager.js → extensions/amp-consent/0.1/consent-config.js
  • Import cycle (2 files) extensions/amp-story-shopping/0.1/amp-story-shopping-attachment.js:11 — extensions/amp-story-shopping/0.1/amp-story-shopping-attachment.js → extensions/amp-story-shopping/0.1/amp-story-shopping.js → extensions/amp-story-shopping/0.1/amp-story-shopping-attachment.js (one verified cycle inside a mutually-dependent group of 3 files)
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom extensions/amp-access/0.1/amp-login-done.html:5 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R8 · Dependency Hygiene · Unlisted import '@babel/helper-module-transforms' · ×1
  • Unlisted import '@babel/helper-module-transforms' build-system/babel-plugins/babel-plugin-nomodule-loader/index.js:13 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@babel/parser' · ×1
  • Unlisted import '@babel/parser' build-system/tasks/get-zindex/js.js:2 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@babel/types' · ×1
  • Unlisted import '@babel/types' build-system/babel-plugins/babel-plugin-deep-pure/index.js:42 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import '@octokit/request-error' · ×1
  • Unlisted import '@octokit/request-error' build-system/release-workflows/cut-nightly.js:11 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'globby' · ×1
  • Unlisted import 'globby' build-system/common/fs.js:1 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R8 · Dependency Hygiene · Unlisted import 'glob' · ×1
  • Unlisted import 'glob' build-system/tasks/e2e/index.js:7 — Imported but not declared in any reachable REDACTED — installs work only by hoisting accident.
R9 · Circular Imports · Import cycle (4 files) · ×1
  • Import cycle (4 files) src/bento/components/bento-base-carousel/1.0/component.js:33 — src/bento/components/bento-base-carousel/1.0/component.js → src/bento/components/bento-base-carousel/1.0/scroller.js → src/bento/components/bento-lightbox-gallery/1.0/component.js → src/bento/components/bento-lightbox-gallery/1.0/provider.js → src/bento/components/bento-base-carousel/1.0/component.js
Serious — 1672 finding(s)
D10 · Test Quality · No assertions · ×283
  • No assertions: fails after invalid AMP validator/js/gulpjs/test/validate.js:121 — 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: fails if validator fails to load validator/js/gulpjs/test/validate.js:131 — 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: passes valid AMP validator/js/gulpjs/test/validate.js:141 — 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 cancel uninstrumented timeouts test/unit/test-3p-environment.js:178 — 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 throw when a string prefix matches test/unit/test-3p.js:34 — 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 throw when any of the array prefixes match test/unit/test-3p.js:38 — 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 throw if source contains /addyn/ test/unit/test-3p.js:50 — 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 allow mandatory fields to have 0 as a value test/unit/test-3p.js:113 — 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 check mandatory fields with alternative options test/unit/test-3p.js:124 — 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 check mandatory and optional fields test/unit/test-3p.js:178 — 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 handle onSuccess callback test/unit/test-3p.js:278 — 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 handle onFailure callback test/unit/test-3p.js:291 — 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: forwards multiple events test/unit/test-base-element.js:186 — 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 execute a chunk test/unit/test-chunk.js:41 — 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 execute a chunk with an ampdoc test/unit/test-chunk.js:155 — 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 proceed on error and rethrowAsync test/unit/test-chunk.js:186 — 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 store CID in storage if opt-in, test/unit/test-cid.js:1088 — 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 wait until the element is upgraded test/unit/test-custom-element-v1.js:617 — 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 build if amp-bind mutation test/unit/test-custom-element-v1.js:631 — 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 propagate setAsContainerInternal without scroller test/unit/test-custom-element-v1.js:962 — 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 propagate setAsContainerInternal with scroller test/unit/test-custom-element-v1.js:970 — 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 propagate removeAsContainerInternal test/unit/test-custom-element-v1.js:978 — 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 build on consent sufficient test/unit/test-custom-element.js:619 — 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 build on no consent policy test/unit/test-custom-element.js:639 — 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 do nothing for already-loaded element test/unit/test-custom-element.js:1896 — 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.
  • + 258 more in this group — see findings.md.
D10 · Test Quality · Skipped test · ×142
  • Skipped test: should sort adConfig in alphabetic order test/unit/test-ads-config.js:13 — Skipped — switched off by it.skip
  • Skipped test: should report experiments test/unit/test-error-reporting.js:604 — Skipped — switched off by it.skip
  • Skipped test: should install all doc factories to shadow doc test/unit/test-extensions.js:707 — Skipped — switched off by it.skip
  • Skipped test: should install all services to doc test/unit/test-extensions.js:872 — Skipped — switched off by it.skip
  • Skipped test: should survive factory failures test/unit/test-extensions.js:1682 — Skipped — switched off by it.skip
  • Skipped test: should write doc if srcdoc is not available test/unit/test-friendly-iframe-embed.js:151 — Skipped — switched off by it.skip
  • Skipped test: should support host test/unit/test-friendly-iframe-embed.js:568 — Skipped — switched off by it.skip
  • Skipped test: should await initial load test/unit/test-friendly-iframe-embed.js:586 — Skipped — switched off by it.skip
  • Skipped test: should await initial with host test/unit/test-friendly-iframe-embed.js:617 — Skipped — switched off by it.skip
  • Skipped test: should un-listen and resolve promise after first hit test/unit/test-iframe-helper.js:140 — Skipped — switched off by it.skip
  • Skipped test: should un-listen on next message when iframe is unattached test/unit/test-iframe-helper.js:163 — Skipped — switched off by it.skip
  • Skipped test: should not allow source::src with invalid protocol test/unit/test-purifier.js:330 — Skipped — switched off by it.skip
  • Skipped test: should remeasure when requested and scheduled unloads test/unit/test-resources.js:802 — Skipped — switched off by it.skip
  • Skipped test: should replace VARIANT test/unit/test-url-replacements.js:676 — Skipped — switched off by it.skip
  • Skipped test: should replace VARIANT with empty string if test/unit/test-url-replacements.js:686 — Skipped — switched off by it.skip
  • Skipped test: should replace VARIANTS with empty string if test/unit/test-url-replacements.js:704 — Skipped — switched off by it.skip
  • Skipped test: should replace NAV_TIMING test/unit/test-url-replacements.js:875 — Skipped — switched off by it.skip
  • Skipped test: should replace REDIRECT_TIME test/unit/test-url-replacements.js:925 — Skipped — switched off by it.skip
  • Skipped test: should report errors & replace them with empty string (sync) test/unit/test-url-replacements.js:1132 — Skipped — switched off by it.skip
  • Skipped test: should report errors & replace them with empty string (promise) test/unit/test-url-replacements.js:1150 — Skipped — switched off by it.skip
  • Skipped test: should initialize firstVisibleTime when doc becomes visible test/unit/test-viewer.js:322 — Skipped — switched off by it.skip
  • Skipped test: should tolerate errors in measures and mutates test/unit/test-vsync.js:102 — Skipped — switched off by it.skip
  • Skipped test: should center the fixed container properly test/unit/inabox/test-inabox-viewport.js:387 — Skipped — switched off by it.skip
  • Skipped test: should push a new state and replace it for target on Natural test/unit/core/window/test-history.js:962 — Skipped — switched off by it.skip
  • Skipped test: should create an iframe loaded test/integration/test-amp-ad-doubleclick.js:36 — Skipped — switched off by it.skip
  • + 117 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×90
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 65 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×57
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 32 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×53
  • TooManyMethods: AmpStory extensions/amp-story/1.0/amp-story.js:222 — TooManyMethods — 97 methods. The bar is 30 methods; this is 67 over it, 3.23× 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: AmpStoryPage REDACTED:166 — TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.20× 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: BaseCustomElement src/custom-element.js:132 — TooManyMethods — 94 methods. The bar is 30 methods; this is 64 over it, 3.13× 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: AmpStoryPlayer src/amp-story-player/amp-story-player-impl.js:188 — TooManyMethods — 86 methods. The bar is 30 methods; this is 56 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.
  • TooManyMethods: AmpA4A extensions/amp-a4a/0.1/amp-a4a.js:226 — TooManyMethods — 80 methods. The bar is 30 methods; this is 50 over it, 2.67× 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: BaseElement src/base-element.js:97 — TooManyMethods — 74 methods. The bar is 30 methods; this is 44 over it, 2.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: AmpDatePicker REDACTED:181 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× 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: AmpAdNetworkDoubleclickImpl REDACTED:210 — TooManyMethods — 66 methods. The bar is 30 methods; this is 36 over it, 2.20× 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: VideoDocking extensions/amp-video-docking/0.1/amp-video-docking.js:230 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.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: ViewportImpl src/service/viewport/viewport-impl.js:95 — TooManyMethods — 61 methods. The bar is 30 methods; this is 31 over it, 2.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: Resource src/service/resource.js:76 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× 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: Bind extensions/amp-bind/0.1/bind-impl.js:109 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.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.
  • TooManyMethods: AmpLightboxGallery extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:91 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.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.
  • TooManyMethods: AmpList extensions/amp-list/0.1/amp-list.js:77 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.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.
  • TooManyMethods: Carousel extensions/amp-base-carousel/0.1/carousel.js:133 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× 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: AmpVideo extensions/amp-video/0.1/amp-video.js:87 — TooManyMethods — 53 methods. The bar is 30 methods; this is 23 over it, 1.77× 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: AmpForm extensions/amp-form/0.1/amp-form.js:95 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: AmpPanZoom extensions/amp-pan-zoom/0.1/amp-pan-zoom.js:49 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× 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: AmpSlideScroll extensions/amp-carousel/0.1/slidescroll.js:52 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× 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: AmpAutocomplete REDACTED:58 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× 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: ResourcesImpl src/service/resources-impl.js:41 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 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.
  • TooManyMethods: ViewerImpl src/service/viewer-impl.js:68 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 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.
  • TooManyMethods: InaboxViewportImpl src/inabox/inabox-viewport.js:96 — 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: AmpStreamGallery extensions/amp-stream-gallery/0.1/amp-stream-gallery.js:67 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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: ViewportBindingInabox src/inabox/inabox-viewport.js:422 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× 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.
  • + 28 more in this group — see findings.md.
R11 · Import Boundaries · Boundary violation [package · ×40
  • Boundary violation [package:third-party-deep-import] build-system/babel-plugins/babel-plugin-transform-log-methods/index.js:34 — build-system/babel-plugins/babel-plugin-transform-log-methods/index.js:34 imports base62/lib/ascii, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] build-system/compile/json-schema/index.js:6 — build-system/compile/json-schema/index.js:6 imports ajv-formats/dist/formats, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] build-system/compile/json-schema/index.js:8 — build-system/compile/json-schema/index.js:8 imports ajv/dist/standalone, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:relative-cross-package] build-system/eslint-rules/core-dom-jsx.js:4 — build-system/eslint-rules/core-dom-jsx.js:4 reaches into another package with a relative path (../../node_modules/eslint/lib/rules/utils/ast-utils) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] build-system/eslint-rules/no-forbidden-terms.js:2 — build-system/eslint-rules/no-forbidden-terms.js:2 imports build-system/test-configs/forbidden-terms.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:relative-cross-package] build-system/eslint-rules/no-global.js:3 — build-system/eslint-rules/no-global.js:3 reaches into another package with a relative path (../../node_modules/eslint/lib/rules/utils/ast-utils) — import the package by name instead.
  • Boundary violation [package:test-suite-dependency] build-system/pr-check/build-targets.js:8 — build-system/pr-check/build-targets.js:8 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] build-system/pr-check/e2e-tests.js:14 — build-system/pr-check/e2e-tests.js:14 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] build-system/pr-check/experiment-e2e-tests.js:13 — build-system/pr-check/experiment-e2e-tests.js:13 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] build-system/pr-check/unit-tests.js:16 — build-system/pr-check/unit-tests.js:16 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] build-system/tasks/check-invalid-whitespaces.js:6 — build-system/tasks/check-invalid-whitespaces.js:6 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] build-system/tasks/check-links.js:9 — build-system/tasks/check-links.js:9 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] build-system/tasks/compile-jison.js:7 — build-system/tasks/compile-jison.js:7 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-suite-dependency] build-system/tasks/dep-check.js:3 — build-system/tasks/dep-check.js:3 imports build-system/test-configs/dep-check-config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • Boundary violation [package:test-cross-package-internals] build-system/tasks/e2e/describes-e2e.js:18 — build-system/tasks/e2e/describes-e2e.js:18 reaches past another workspace package's public entry into its internals with a relative path (../../../testing/helpers) — 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] build-system/tasks/e2e/describes-e2e.js:19 — build-system/tasks/e2e/describes-e2e.js:19 reaches past another workspace package's public entry into its internals with a relative path (../serve) — 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] build-system/tasks/e2e/describes-e2e.js:21 — build-system/tasks/e2e/describes-e2e.js:21 reaches past another workspace package's public entry into its internals with a relative path (../../common/ci) — 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] build-system/tasks/e2e/index.js:15 — build-system/tasks/e2e/index.js:15 reaches past another workspace package's public entry into its internals with a relative path (../../common/utils) — 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] build-system/tasks/e2e/index.js:19 — build-system/tasks/e2e/index.js:19 reaches past another workspace package's public entry into its internals with a relative path (../../common/ctrlcHandler) — 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] build-system/tasks/e2e/index.js:21 — build-system/tasks/e2e/index.js:21 reaches past another workspace package's public entry into its internals with a relative path (../../common/exec) — 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] build-system/tasks/e2e/index.js:22 — build-system/tasks/e2e/index.js:22 reaches past another workspace package's public entry into its internals with a relative path (../serve) — 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] build-system/tasks/e2e/index.js:23 — build-system/tasks/e2e/index.js:23 reaches past another workspace package's public entry into its internals with a relative path (../../common/ci) — 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] build-system/tasks/e2e/index.js:24 — build-system/tasks/e2e/index.js:24 reaches past another workspace package's public entry into its internals with a relative path (../../common/logging) — 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] build-system/tasks/e2e/index.js:25 — build-system/tasks/e2e/index.js:25 reaches past another workspace package's public entry into its internals with a relative path (../helpers) — 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-suite-dependency] build-system/tasks/helpers.js:21 — build-system/tasks/helpers.js:21 imports build-system/test-configs/config.js, a module inside the test suite — test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×38
  • Swallowed exception (empty catch) src/ad-helper.js:97 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/cookies.js:207 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/cookies.js:289 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/error-reporting.js:334 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/error-reporting.js:356 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) src/error-reporting.js:359 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/impression.js:92 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) src/service-helpers.js:293 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/service-helpers.js:639 — `.catch(() => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) src/shadow-embed.js:222 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/shadow-embed.js:229 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/style-installer.js:226 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/validator-integration.js:72 — `.then(…, () => {})` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) REDACTED:330 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/utils/log.js:148 — `.then(…, noop)` handles the rejection by doing nothing — the failure is discarded with no log and no rethrow, and the chain carries on as if the work succeeded. Log it through whatever this codebase already uses to report problems, hand it to a caller that can (`next(error)`, a returned rejection), or don't catch it.
  • Swallowed exception (empty catch) src/service/action-impl.js:849 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:571 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:635 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/service/resources-impl.js:1734 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/service/standard-actions-impl.js:146 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/service/standard-actions-impl.js:351 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/service/viewport/viewport-impl.js:234 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/core/window/clipboard.js:42 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/core/dom/event-helper-listen.js:111 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) src/core/dom/event-helper-listen.js:160 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 13 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×35
  • FileTooLong: 1.0/amp-story.js extensions/amp-story/1.0/amp-story.js — FileTooLong — 1390 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AmpStory (222-2851). The bar is 500 significant lines; this is 890 over it, 2.78× 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: 0.1/amp-a4a.js extensions/amp-a4a/0.1/amp-a4a.js — FileTooLong — 1270 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 85% of them inside a single declaration: AmpA4A (226-2553). The bar is 500 significant lines; this is 770 over it, 2.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: REDACTED REDACTED — FileTooLong — 1167 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 85% of them inside a single declaration: AmpAdNetworkDoubleclickImpl (210-2024). The bar is 500 significant lines; this is 667 over it, 2.33× 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: amp-story-player/amp-story-player-impl.js src/amp-story-player/amp-story-player-impl.js — FileTooLong — 960 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: AmpStoryPlayer (188-2079). The bar is 500 significant lines; this is 460 over it, 1.92× 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 — 957 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 457 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: src/custom-element.js src/custom-element.js — FileTooLong — 940 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: createBaseCustomElementClass (123-2152). The bar is 500 significant lines; this is 440 over it, 1.88× 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 — 934 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 90% of them inside a single declaration: AmpDatePicker (181-1961). The bar is 500 significant lines; this is 434 over it, 1.87× 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: service/resources-impl.js src/service/resources-impl.js — FileTooLong — 921 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ResourcesImpl (41-1807). The bar is 500 significant lines; this is 421 over it, 1.84× 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 — 909 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AmpStoryPage (166-2050). The bar is 500 significant lines; this is 409 over it, 1.82× 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: 0.1/events.js extensions/amp-analytics/0.1/events.js — FileTooLong — 883 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 383 over it, 1.77× 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: 0.1/bind-impl.js extensions/amp-bind/0.1/bind-impl.js — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: Bind (109-1774). The bar is 500 significant lines; this is 354 over it, 1.71× 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 — 837 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 337 over it, 1.67× 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: 0.1/amp-video-docking.js extensions/amp-video-docking/0.1/amp-video-docking.js — FileTooLong — 822 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 87% of them inside a single declaration: ShadowLayer (206-1746). The bar is 500 significant lines; this is 322 over it, 1.64× 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: 0.1/amp-list.js extensions/amp-list/0.1/amp-list.js — FileTooLong — 810 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: AmpList (77-1701). The bar is 500 significant lines; this is 310 over it, 1.62× 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: 0.1/amp-form.js extensions/amp-form/0.1/amp-form.js — FileTooLong — 802 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 78% of them inside a single declaration: AmpForm (95-1428). The bar is 500 significant lines; this is 302 over it, 1.60× 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: service/video-manager-impl.js src/service/video-manager-impl.js — FileTooLong — 722 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 222 over it, 1.44× 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: 0.1/amp-lightbox-gallery.js extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js — FileTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AmpLightboxGallery (91-1401). The bar is 500 significant lines; this is 215 over it, 1.43× 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 — 678 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 178 over it, 1.36× 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: service/action-impl.js src/service/action-impl.js — FileTooLong — 664 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 164 over it, 1.33× 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: 0.1/amp-image-lightbox.js extensions/amp-image-lightbox/0.1/amp-image-lightbox.js — FileTooLong — 661 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 161 over it, 1.32× 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: 0.1/web-animations.js extensions/amp-animation/0.1/web-animations.js — FileTooLong — 627 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 127 over it, 1.25× 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: viewport/viewport-impl.js src/service/viewport/viewport-impl.js — FileTooLong — 619 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 81% of them inside a single declaration: ViewportImpl (95-1094). The bar is 500 significant lines; this is 119 over it, 1.24× 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: service/url-replacements-impl.js src/service/url-replacements-impl.js — FileTooLong — 612 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 112 over it, 1.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: 0.1/amp-subscriptions-google.js extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js — FileTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: GoogleSubscriptionsPlatform (97-1020). The bar is 500 significant lines; this is 89 over it, 1.18× 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: parsers/css-expr-ast.js extensions/amp-animation/0.1/parsers/css-expr-ast.js — FileTooLong — 562 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 62 over it, 1.12× 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.
  • + 10 more in this group — see findings.md.
X24 · Document value interpolated into markup unescaped · Untrusted text written into markup unescaped · ×32
  • Untrusted text written into markup unescaped 3p/3p.js:124 — `'<'+'script>__runScript'+index+'()<'+'/script>'` is text this program did not author, and it is written into the text of an element through `document.write` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped ads/vendors/insticator.js:30 — `embedId` is text this program did not author, and it is written into a quoted attribute value through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped ads/vendors/jioads.js:60 — `global.context.container` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped ads/vendors/jioads.js:61 — `data['adspot']` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped ads/vendors/jioads.js:62 — `data['pkgName']` is text this program did not author, and it is written into a quoted attribute value through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped ads/vendors/pubfuture.js:13 — `data.id` is text this program did not author, and it is written into a script or style context through `document.write` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped REDACTED:72 — `req.query.body` is text this program did not author, and it is written into the text of an element through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped build-system/server/app-video-testbench.js:271 — `node.outerHTML.replace(new RegExp(`^\<${tagName}`,'i'),`<${withTagName}`).replace(new RegExp(`\</${tagName}\>$`,'i'),…` is text this program did not author, and it is written into the text of an element through `outerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped build-system/server/app-video-testbench.js:273 — `withTagName` is text this program did not author, and it is written into an unquoted attribute through markup built here with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
  • Untrusted text written into markup unescaped REDACTED:125 — `newMode` is text this program did not author, and it is written into the text of an element through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:127 — `newMode` is text this program did not author, and it is written into the text of an element through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:303 — `fields['name']` is text this program did not author, and it is written into the text of an element through `res.end` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:304 — `fields['email']` is text this program did not author, and it is written into the text of an element through `res.end` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:308 — `fields['name']` is text this program did not author, and it is written into the text of an element through `res.end` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:309 — `fields['email']` is text this program did not author, and it is written into the text of an element through `res.end` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:904 — `req.url.substr(7)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped REDACTED:946 — `message` is text this program did not author, and it is written into a script or style context through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped REDACTED:947 — `message` is text this program did not author, and it is written into a script or style context through `res.send` (the page this server sends) with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. A script or style context needs its own escaping (or a JSON serialiser that escapes `<`); better, pass the value through a data attribute.
  • Untrusted text written into markup unescaped REDACTED:1552 — `filePath` is text this program did not author, and it is written into an unquoted attribute through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML text encoding does not help in an unquoted attribute — whitespace ends it; quote the attribute and encode the value.
  • Untrusted text written into markup unescaped extensions/amp-a4a/0.1/secure-frame.js:42 — `escapeHtml(url)` is text this program did not author, and it is written into the start of a URL attribute, where it chooses the scheme through markup this function returns with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. HTML encoding does not help here — a `javascript:` URL contains nothing it changes; allow only http(s) or a relative path.
  • Untrusted text written into markup unescaped extensions/amp-ad-network-adzerk-impl/0.1/amp-ad-network-adzerk-impl.js:183 — `renderedElement.innerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:64 — `JSON.stringify(spec)` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:1830 — `html` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped REDACTED:36 — `content` is text this program did not author, and it is written into the text of an element through `dangerouslySetInnerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • Untrusted text written into markup unescaped extensions/amp-render/1.0/amp-render.js:59 — `template.innerHTML` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
  • + 7 more in this group — see findings.md.
D30 · Dependency Vulnerabilities · Medium CVE · ×30
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 5 more in this group — see findings.md.
R4 · Test Coverage · No test reaches this file · ×30
  • No test reaches this file extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.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 extensions/amp-sidebar/1.0/storybook/Basic.amp.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 3p/integration.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 build-system/tasks/sweep-experiments/index.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 src/bento/components/bento-autocomplete/1.0/component/component.tsx: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 build-system/compile/json-schema/index.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 build-system/pr-check/build-targets.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 src/bento/components/bento-mega-menu/1.0/storybook/Basic.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 extensions/amp-sidebar/1.0/storybook/Basic.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 build-system/babel-plugins/babel-plugin-transform-jss/index.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 ads/vendors/adocean.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 extensions/amp-lightbox/1.0/storybook/Basic.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 extensions/amp-lightbox/1.0/storybook/Basic.amp.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 build-system/tasks/dep-check.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 extensions/amp-access-scroll/0.1/scroll-impl.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 build-system/eslint-rules/unused-private-field.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 3p/3d-gltf/viewer.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 build-system/tasks/bundle-size/index.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 build-system/pr-check/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 extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.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 extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.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 build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.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 extensions/amp-inline-gallery/0.1/amp-inline-gallery-pagination.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 ads/vendors/revcontent.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.
  • + 5 more in this group — see findings.md.
PF3 · Async & latency hygiene · Sync-over-async blocking · ×25
  • Sync-over-async blocking build-system/server/app-index/index.js:31 — `fs.readFileSync` in `serveIndex` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/server/app-index/util/listing.js:32 — `fs.statSync` in `getListing` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:579 — `fs.readFileSync` in `app.use("/examples/live-list-update(-reverse)?.amp.html")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:46 — `fs.readFileSync` in `checkFile` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/clean.js:74 — `fs.existsSync` in `clean` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/compile-jison.js:60 — `fs.readFileSync` in `compileExpr` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/dep-check.js:164 — `fs.statSync` in `callback to filter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/dist.js:282 — `fs.existsSync` in `postBuildWebPushPublisherFilesVersion` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/firebase.js:19 — `fs.statSync` in `walk` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/helpers.js:670 — `fs.readFileSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/helpers.js:674 — `fs.existsSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/helpers.js:675 — `fs.unlinkSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/helpers.js:677 — `fs.symlinkSync` in `thirdPartyBootstrap` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/lint.js:36 — `fs.readFileSync` in `runLinter` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:158 — `fs.existsSync` in `getConfig` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/prettify.js:67 — `fs.readFileSync` in `printErrorWithSuggestedFixes` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/prettify.js:71 — `fs.writeFileSync` in `printErrorWithSuggestedFixes` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/prettify.js:115 — `fs.readFileSync` in `runPrettify` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/prettify.js:119 — `fs.writeFileSync` in `runPrettify` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/release/index.js:460 — `fs.existsSync` in `prependConfig_` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/visual-diff/browser.js:100 — `fs.existsSync` in `page.on("request")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking build-system/tasks/visual-diff/browser.js:110 — `fs.readFileSync` in `page.on("request")` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:648 — `fs.readFileSync` in `performVisualTests` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:675 — `fs.existsSync` in `ensureOrBuildAmpRuntimeInTestMode_` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
  • Sync-over-async blocking REDACTED:677 — `fs.readFileSync` in `ensureOrBuildAmpRuntimeInTestMode_` blocks the event loop until it finishes — a blocking call inside async code stalls the event loop — every other request waits for as long as it runs.
D3 · God Classes · ClassTooLong · ×22
  • ClassTooLong: AmpStory extensions/amp-story/1.0/amp-story.js:222 — ClassTooLong — 1256 significant lines (blank, comment-only and punctuation-only lines excluded), 97 methods. The bar is 400 significant lines; this is 856 over it, 3.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: AmpA4A extensions/amp-a4a/0.1/amp-a4a.js:226 — ClassTooLong — 1076 significant lines (blank, comment-only and punctuation-only lines excluded), 80 methods. The bar is 400 significant lines; this is 676 over it, 2.69× 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: AmpAdNetworkDoubleclickImpl REDACTED:210 — ClassTooLong — 987 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 587 over it, 2.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.
  • ClassTooLong: ResourcesImpl src/service/resources-impl.js:41 — ClassTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 487 over it, 2.22× 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: AmpStoryPlayer src/amp-story-player/amp-story-player-impl.js:188 — ClassTooLong — 882 significant lines (blank, comment-only and punctuation-only lines excluded), 86 methods. The bar is 400 significant lines; this is 482 over it, 2.21× 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: AmpDatePicker REDACTED:181 — ClassTooLong — 840 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 440 over it, 2.10× 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: AmpStoryPage REDACTED:166 — ClassTooLong — 818 significant lines (blank, comment-only and punctuation-only lines excluded), 96 methods. The bar is 400 significant lines; this is 418 over it, 2.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: Bind extensions/amp-bind/0.1/bind-impl.js:109 — ClassTooLong — 761 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 361 over it, 1.90× 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: AmpList extensions/amp-list/0.1/amp-list.js:77 — ClassTooLong — 760 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 360 over it, 1.90× 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: AmpLightboxGallery extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:91 — ClassTooLong — 640 significant lines (blank, comment-only and punctuation-only lines excluded), 55 methods. The bar is 400 significant lines; this is 240 over it, 1.60× 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: AmpForm extensions/amp-form/0.1/amp-form.js:95 — ClassTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 226 over it, 1.57× 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: AmpSlideScroll extensions/amp-carousel/0.1/slidescroll.js:52 — ClassTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 114 over it, 1.29× 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: NextPageService REDACTED:54 — ClassTooLong — 510 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 110 over it, 1.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: ViewportImpl src/service/viewport/viewport-impl.js:95 — ClassTooLong — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 61 methods. The bar is 400 significant lines; this is 104 over it, 1.26× 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: AmpConsent extensions/amp-consent/0.1/amp-consent.js:59 — ClassTooLong — 482 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 82 over it, 1.21× 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: GoogleSubscriptionsPlatform extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js:97 — ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 67 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: AmpVideo extensions/amp-video/0.1/amp-video.js:87 — ClassTooLong — 461 significant lines (blank, comment-only and punctuation-only lines excluded), 53 methods. The bar is 400 significant lines; this is 61 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: AmpImageViewer extensions/amp-image-viewer/0.1/amp-image-viewer.js:51 — ClassTooLong — 435 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 35 over it, 1.09× 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: ConsentUI REDACTED:71 — ClassTooLong — 417 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 17 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: AmpPanZoom extensions/amp-pan-zoom/0.1/amp-pan-zoom.js:49 — ClassTooLong — 415 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 15 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: AmpAnalytics REDACTED:47 — ClassTooLong — 407 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 7 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: Resource src/service/resource.js:76 — ClassTooLong — 402 significant lines (blank, comment-only and punctuation-only lines excluded), 59 methods. 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.
D3 · God Classes · FunctionTooLong · ×21
  • FunctionTooLong: custom-element.createBaseCustomElementClass src/custom-element.js:123 — FunctionTooLong — createBaseCustomElementClass runs 841 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 741 over it, 8.41× 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: component.BentoAutocomplete src/bento/components/bento-autocomplete/1.0/component/component.tsx:43 — FunctionTooLong — BentoAutocomplete runs 337 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 237 over it, 3.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.
  • FunctionTooLong: Basic.amp.scroll extensions/amp-sidebar/1.0/storybook/Basic.amp.js:287 — FunctionTooLong — scroll runs 282 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 182 over it, 2.82× 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: Basic.amp.OverflowAuto extensions/amp-lightbox/1.0/storybook/Basic.amp.js:63 — FunctionTooLong — OverflowAuto runs 265 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 165 over it, 2.65× 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: Basic.scroll extensions/amp-sidebar/1.0/storybook/Basic.js:87 — FunctionTooLong — scroll runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62× 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: Basic.Detailed src/bento/components/bento-mega-menu/1.0/storybook/Basic.js:185 — FunctionTooLong — Detailed runs 220 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 120 over it, 2.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: amp-story-store-service.actions extensions/amp-story/1.0/amp-story-store-service.js:297 — FunctionTooLong — actions runs 169 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 69 over it, 1.69× 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: index.transformAjvCode build-system/compile/json-schema/index.js:172 — FunctionTooLong — transformAjvCode runs 162 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 62 over it, 1.62× 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: index.snapshotWebpages REDACTED:349 — FunctionTooLong — snapshotWebpages runs 135 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • FunctionTooLong: index.default build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js:15 — FunctionTooLong — default runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: component.BentoIframe extensions/amp-iframe/1.0/component.js:24 — FunctionTooLong — BentoIframe runs 133 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 33 over it, 1.33× 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: Basic.scrollable extensions/amp-lightbox/1.0/storybook/Basic.js:187 — FunctionTooLong — scrollable runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • FunctionTooLong: Basic.BentoLightboxWithActions extensions/amp-lightbox/1.0/storybook/Basic.js:33 — FunctionTooLong — BentoLightboxWithActions runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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: Basic.WithIntersectionObserver extensions/amp-timeago/1.0/storybook/Basic.js:50 — FunctionTooLong — WithIntersectionObserver runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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: helpers.esbuildCompile build-system/tasks/helpers.js:259 — FunctionTooLong — esbuildCompile runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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: enums.create build-system/eslint-rules/enums.js:40 — FunctionTooLong — create runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.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: sanitizer.sanitizeHtml src/sanitizer.js:67 — FunctionTooLong — sanitizeHtml runs 113 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× 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: use-date-picker-input.useDatePickerInput extensions/amp-date-picker/1.0/component/use-date-picker-input.tsx:26 — FunctionTooLong — useDatePickerInput runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× 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: date-picker-common.withDatePickerCommon extensions/amp-date-picker/0.1/date-picker-common.js:11 — FunctionTooLong — withDatePickerCommon runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: use-date-picker-context.DatePickerProvider extensions/amp-date-picker/1.0/component/use-date-picker-context.tsx:54 — FunctionTooLong — DatePickerProvider runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: index.default build-system/babel-plugins/babel-plugin-transform-function-declarations/index.js:10 — FunctionTooLong — default runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× 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.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×20
  • Focus outline removed in CSS without a :focus replacement third_party/subscriptions-project/swg-button.css:112 — `.swg-smart-button:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement third_party/react-dates/_datepicker.css:243 — `.DayPicker_focusRegion` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement third_party/react-dates/_datepicker.css:808 — `.DateInput_input__focused` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-stream-gallery/0.1/arrows.css:50 — `.i-amphtml-stream-gallery-prev` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-page-attachment/0.1/amp-story-draggable-drawer.css:107 — `body:not(.amp-mode-keyboard-active) amp-story:not([desktop]) .i-amphtml-story-draggable-drawer-spacer` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-interactive/0.1/amp-story-interactive-binary-poll.css:34 — `.i-amphtml-story-interactive-option` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-interactive/0.1/amp-story-interactive-img.css:66 — `.i-amphtml-story-interactive-img-option:focus` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-interactive/0.1/amp-story-interactive-poll.css:29 — `.i-amphtml-story-interactive-option` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-interactive/0.1/amp-story-interactive-quiz.css:39 — `.i-amphtml-story-interactive-quiz-option` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.css:222 — `.i-amphtml-story-dev-tools-device-dialog-close` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.css:116 — `.i-amphtml-story-dev-tools-tab-selector` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story-360/0.1/amp-story-360.css:20 — `.i-amphtml-story-360-activate-button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-story/1.0/pagination-buttons.css:19 — `.i-amphtml-story-button-container` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-selector/0.1/amp-selector.css:22 — `amp-selector[disabled] [option]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-inline-gallery/0.1/amp-inline-gallery-slide.css:59 — `.i-amphtml-inline-gallery-slide-see-more` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-base-carousel/0.1/amp-base-carousel.css:149 — `.i-amphtml-base-carousel-arrow` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-base-carousel/0.1/carousel.css:24 — `.i-amphtml-carousel-scroll` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-apester-media/0.1/amp-apester-media.css:45 — `.amp-apester-overflow button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement extensions/amp-access-fewcents/0.1/amp-access-fewcents.css:45 — `.aaf-purchase-button` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement build-system/server/app-index/main.css:94 — `.selector-block[option][selected]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×20
  • Outbound HTTP without resilience REDACTED:93 — `https.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:54 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:201 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:514 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/server/routes/a4a-envelopes.js:128 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/status-page/comment.js:49 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/status-page/incident.js:61 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/status-page/incident.js:75 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/status-page/incident.js:108 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/tasks/bundle-size/index.js:83 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/tasks/bundle-size/index.js:154 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:56 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/tasks/release/index.js:311 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/tasks/release/index.js:321 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience build-system/tasks/sweep-experiments/cleanup-branches.js:30 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience extensions/amp-render/1.0/component.js:19 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/amp-story-player/amp-story-player-impl.js:851 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience src/web-worker/web-worker.js:127 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience testing/helpers/service.js:213 — `fetch(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:33 — `http.Client {` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D29 · Static Analysis (SAST) · REDACTED · ×18
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · MethodTooLong · ×17
  • MethodTooLong: GlobalVariableSource.initialize src/service/url-replacements-impl.js:125 — MethodTooLong — initialize runs 255 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 155 over it, 2.55× 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: AmpA4A.initiateAdRequest extensions/amp-a4a/0.1/amp-a4a.js:684 — MethodTooLong — initiateAdRequest runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) 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: ResourcesImpl.mutateWork_ src/service/resources-impl.js:712 — MethodTooLong — mutateWork_ runs 159 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • MethodTooLong: AmpAdNetworkValueimpressionImpl.getAdUrl extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:193 — MethodTooLong — getAdUrl runs 155 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 55 over it, 1.55× 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: BindExpression.eval_ extensions/amp-bind/0.1/bind-expression.js:325 — MethodTooLong — eval_ runs 140 significant lines (blank, comment-only and punctuation-only lines excluded) 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: AmpStory.initializeListeners_ extensions/amp-story/1.0/amp-story.js:657 — MethodTooLong — initializeListeners_ 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: AmpAdNetworkAdsenseImpl.getAdUrl extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:279 — MethodTooLong — getAdUrl runs 136 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 36 over it, 1.36× 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: AmpAdXOriginIframeHandler.init extensions/amp-ad/0.1/amp-ad-xorigin-iframe-handler.js:101 — MethodTooLong — init runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× 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: PinWidget.renderPin extensions/amp-pinterest/0.1/pin-widget.js:98 — MethodTooLong — renderPin runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× 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: AmpFixture.setup testing/describes.js:699 — MethodTooLong — setup runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: ResourcesImpl.discoverWork_ src/service/resources-impl.js:1048 — MethodTooLong — discoverWork_ runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • MethodTooLong: FakeWindow.constructor REDACTED:21 — MethodTooLong — constructor runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • MethodTooLong: GoogleSubscriptionsPlatform.constructor extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js:103 — MethodTooLong — constructor runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) 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.
  • MethodTooLong: VideoDocking.placeAt_ extensions/amp-video-docking/0.1/amp-video-docking.js:902 — MethodTooLong — placeAt_ runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× 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: PreactBaseElement.rerender_ src/preact/base-element.js:611 — MethodTooLong — rerender_ runs 106 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 6 over it, 1.06× 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: AmpStoryShoppingAttachment.renderPdpTemplate_ extensions/amp-story-shopping/0.1/amp-story-shopping-attachment.js:365 — MethodTooLong — renderPdpTemplate_ runs 105 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× 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: SystemLayer.initializeListeners_ extensions/amp-story/1.0/amp-story-system-layer.js:395 — MethodTooLong — initializeListeners_ runs 103 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 3 over it, 1.03× 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.
AC3 · Page structure · Page without a main landmark · ×16
  • Page without a main landmark 3p/frame.max.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark 3p/recaptcha.max.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:51 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark REDACTED:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark build-system/server/shadow-viewer.js:133 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <amp-viewer>, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark build-system/tasks/visual-diff/snippets/snapshot-error.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extensions/amp-access/0.1/amp-login-done.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extensions/amp-ad-network-fake-impl/0.1/data/fake_amp.html:1 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extensions/amp-ad-network-fake-impl/0.1/data/fake_amp_ad_with_html_attr.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extensions/amp-ad-network-fake-impl/0.1/data/fake_amp_ad_with_iframe_transport.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extensions/amp-ad-network-fake-impl/0.1/data/fake_amp_visibilityspec.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extensions/amp-bodymovin-animation/amp-bodymovin-animation.html:8 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. This document's body is only the mount point <amp-bodymovin-animation>, so there is no content here to wrap — render the <main> from the component mounted into it.
  • Page without a main landmark extensions/amp-iframe/0.1/storybook/iframe.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
  • Page without a main landmark extensions/amp-web-push/0.1/amp-web-push-permission-dialog.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
D29 · Static Analysis (SAST) · REDACTED · ×15
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Fake-async · ×13
  • Fake-async — async method never awaits build-system/tasks/ava.js:44 — `ava` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/check-renovate-config.js:47 — `checkRenovateConfig` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/check-sourcemaps.js:172 — `checkSourcemaps` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/check-types.js:31 — `typeCheck` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/extension-helpers.js:378 — `watchExtension` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/helpers.js:231 — `finishBundle` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/pr-check.js:25 — `prCheck` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/serve.js:170 — `stopServer` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/sweep-experiments/index.js:416 — `sweepExperiments` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/validator.js:15 — `validator` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/validator.js:26 — `validatorCpp` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits build-system/tasks/validator.js:52 — `validatorWebui` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
  • Fake-async — async method never awaits REDACTED:669 — `ensureOrBuildAmpRuntimeInTestMode_` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work.
D29 · Static Analysis (SAST) · REDACTED · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R4 · Test Coverage · This test file cannot be loaded · ×10
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/input.mjs:2 — build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/input.mjs:2 imports '../ANYWHERE_THAT_LEADS_TO/core/dom/jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/output.mjs:2 — build-system/babel-plugins/babel-plugin-dom-jsx-svg-namespace/test/fixtures/transform/sets-prop/output.mjs:2 imports '../ANYWHERE_THAT_LEADS_TO/core/dom/jsx', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/export-from/input.mjs:1 — build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/export-from/input.mjs:1 imports './abc', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/imports-and-exports/input.mjs:1 — build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/imports-and-exports/input.mjs:1 imports './foo', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/single-import-name/input.mjs:1 — build-system/babel-plugins/babel-plugin-nomodule-loader/test/fixtures/transform/single-import-name/input.mjs:1 imports './foo', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs:7 — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/input.mjs:7 imports './foo.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs:1 — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-deopt-use-styles/output.mjs:1 imports './bar.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (3 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs:1 — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/input.mjs:1 imports '../foo.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs:1 — build-system/babel-plugins/babel-plugin-transform-jss/test/fixtures/transform-assertions/should-replace-use-styles/output.mjs:1 imports '../foo.jss', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (8 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
  • This test file cannot be loaded build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs:1 — build-system/babel-plugins/babel-plugin-transform-promise-resolve/test/fixtures/transform/relative-importing/output.mjs:1 imports './core/data-structures/promise', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either (1 further unresolvable import(s) in the same file). The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing.
X2 · Cancellation propagation · Async function without AbortSignal · ×10
  • Async function without AbortSignal: checkFile REDACTED:39 — `checkFile` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: fetchAmpSw_ build-system/tasks/release/index.js:304 — `fetchAmpSw_` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: skipBundleSize build-system/tasks/bundle-size/index.js:146 — `skipBundleSize` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: addComment build-system/status-page/comment.js:32 — `addComment` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: createIncident build-system/status-page/incident.js:39 — `createIncident` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: getIncident build-system/status-page/incident.js:74 — `getIncident` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: updateIncident build-system/status-page/incident.js:96 — `updateIncident` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: passthroughServeModeCdn REDACTED:49 — `passthroughServeModeCdn` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: requestAmphtmlDocUrl REDACTED:197 — `requestAmphtmlDocUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
  • Async function without AbortSignal: requestFromUrl build-system/server/routes/a4a-envelopes.js:127 — `requestFromUrl` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
D29 · Static Analysis (SAST) · REDACTED · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D12 · Dependency Hygiene · Deprecated · ×8
  • Deprecated: intersection-observer REDACTED:28 — intersection-observer 0.12.0, declared in REDACTED, is marked deprecated by its publisher: "The Intersection Observer polyfill is no longer needed and can safely be removed. Intersection Observer has been Baseline since 2019.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint REDACTED:104 — eslint 8.57.1, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: multer REDACTED:163 — multer 1.4.5-lts.1, declared in REDACTED, is marked deprecated by its publisher: "Multer 1.x is impacted by a number of vulnerabilities, which have been patched in 2.x. You should upgrade to the latest 2.x version.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: sinon REDACTED:174 — sinon 11.1.2, declared in REDACTED, is marked deprecated by its publisher: "16.1.1". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: tar REDACTED:178 — tar 6.2.1, declared in REDACTED, is marked deprecated by its publisher: "Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint third_party/amp-toolbox-cache-url/REDACTED:36 — eslint 9.39.2, declared in third_party/amp-toolbox-cache-url/REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: rollup-plugin-commonjs third_party/amp-toolbox-cache-url/REDACTED:44 — rollup-plugin-commonjs 10.1.0, declared in third_party/amp-toolbox-cache-url/REDACTED, is marked deprecated by its publisher: "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-commonjs.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: rollup-plugin-json third_party/amp-toolbox-cache-url/REDACTED:47 — rollup-plugin-json 4.0.0, declared in third_party/amp-toolbox-cache-url/REDACTED, is marked deprecated by its publisher: "This module has been deprecated and is no longer maintained. Please use @rollup/plugin-json.". Replace it with the package or version that message names, or record why this one must stay.
GD1 · Unfinished & placeholder code · Unfinished stub · ×8
  • Unfinished stub — throws a "not implemented" error extensions/amp-story-auto-ads/0.1/algorithm-interface.js:19 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error extensions/amp-story-auto-ads/0.1/algorithm-interface.js:29 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error extensions/amp-story-auto-ads/0.1/algorithm-interface.js:37 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error extensions/amp-story-auto-ads/0.1/algorithm-interface.js:44 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error src/utils/dom-writer.js:134 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error src/utils/dom-writer.js:139 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error src/utils/dom-writer.js:272 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
  • Unfinished stub — throws a "not implemented" error src/utils/dom-writer.js:277 — A shipped function's whole body still throws a "not implemented" error — generated scaffolding that was never completed. Implement it or remove the dead surface.
IC1 · Incompleteness & stubs · Unfinished stub · ×8
  • Unfinished stub — throws a "not implemented" exception extensions/amp-story-auto-ads/0.1/algorithm-interface.js:19 — `isStoryEligible` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception extensions/amp-story-auto-ads/0.1/algorithm-interface.js:29 — `initializePages` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception extensions/amp-story-auto-ads/0.1/algorithm-interface.js:37 — `onPageChange` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception extensions/amp-story-auto-ads/0.1/algorithm-interface.js:44 — `onNewAdView` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception src/utils/dom-writer.js:134 — `abort` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception src/utils/dom-writer.js:139 — `releaseLock` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception src/utils/dom-writer.js:272 — `abort` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
  • Unfinished stub — throws a "not implemented" exception src/utils/dom-writer.js:277 — `releaseLock` throws an exception whose message says it isn't finished — a not-implemented stub wearing an ordinary exception. Implement it or remove it.
AC4 · Keyboard semantics · Anchor without href · ×6
  • Anchor without href extensions/amp-access/0.1/amp-login-done.html:272 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href REDACTED:1101 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-debug.js:65 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js:51 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.js:62 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
  • Anchor without href extensions/amp-story-interactive/0.1/interactive-disclaimer.js:44 — An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action.
D17 · Explicit Debt · TodoComment · ×5
  • TodoComment REDACTED:92 — # Ensure JVM installed. TODO: Check for version? — 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 REDACTED:429 — # TODO(johannes): Increase coverage for default values, e.g. enums. — 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 validator/js/webui/build.py:4 — # TODO(powdercloud): Make a gulp file or similar for this. For now — 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 extensions/amp-date-picker/1.0/constants.ts:17 — // TODO: Check on this tag name — 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 extensions/amp-date-picker/1.0/component/use-date-picker-context.tsx:173 — // TODO: Implement other labels from defaultPhrases.js — 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.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×5
  • Recursive walk over a caller-supplied document has no depth cap src/core/types/object/index.js:165 — `objectsEqualDeep` is exported and takes `o1: object` from its caller, and it calls itself at line 165 (`objectsEqualDeep`) with a piece of `o1` (and at line 175) — and nowhere in `objectsEqualDeep` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `objectsEqualDeep` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap src/core/types/object/index.js:210 — `recreateNonProtoObject` is exported and takes `obj: object` from its caller, and it calls itself at line 210 (`recreateNonProtoObject`) with a piece of `obj` — and nowhere in `recreateNonProtoObject` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `recreateNonProtoObject` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap extensions/amp-bind/0.1/bind-expression.js:538 — `eval_` is exported and takes `scope: object` from its caller, and it calls itself at line 538 (`this.eval_`) with a piece of `scope` — and nowhere in `eval_` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `eval_` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap build-system/tasks/3p-vendor-helpers.js:40 — `buildVendorConfigs` is exported and takes `options: object` from its caller, and it calls itself at line 40 (`buildVendorConfigs`) with a piece of `options` — and nowhere in `buildVendorConfigs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `buildVendorConfigs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap build-system/compile/json-schema/index.js:87 — `ajvCompile` is exported, takes a document from its caller (line 128) and hands it to `addCustomValidatorsToSchema`, which calls itself at line 87 (`addCustomValidatorsToSchema`) with a piece of `schema` (and at line 95) — and nowhere in `addCustomValidatorsToSchema` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. JavaScript sets no limit of its own on that nesting: `JSON.parse` accepts any depth, so a 100,000-byte body — inside Express's default 100kb limit — parses to 50,000 levels, and a walk like this one throws `RangeError: Maximum call stack size exceeded` long before it reaches the bottom. Wherever that throw lands, the work fails: a request errors, and a walk running outside any `try` — an event handler, a timer, a promise nobody awaits — takes the Node process down with every other request in flight. Thread a depth argument through `addCustomValidatorsToSchema` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
D2 · Cognitive Complexity · buildCallback (cognitive 21) · ×3
  • buildCallback (cognitive 21) REDACTED:361 — buildCallback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 4, ternaries 2 (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, 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.
  • buildCallback (cognitive 21) extensions/amp-sidebar/0.1/amp-sidebar.js:144 — buildCallback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 256, 209, 238, …). 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.
  • buildCallback (cognitive 21) extensions/amp-sidebar/0.2/amp-sidebar.js:145 — buildCallback has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 254, 214, 243, …). 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.
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×3
  • Low cohesion: RuntimeTestConfig (LCOM4 6) build-system/tasks/runtime-test/runtime-test-base.js:45 — RuntimeTestConfig's methods fall into 6 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 6 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: AmpRender (LCOM4 4) extensions/amp-render/1.0/amp-render.js:76 — AmpRender'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.
  • Low cohesion: StandardActions (LCOM4 4) src/service/standard-actions-impl.js:54 — StandardActions'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 (46 lines × 2 locations) · ×3
  • Duplicated block (46 lines × 2 locations) ads/google/a4a/shared/url-builder.js:15 — ads/google/a4a/shared/url-builder.js:15 · extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:513 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
  • Duplicated block (46 lines × 2 locations) extensions/amp-base-carousel/0.1/dimensions.js:105 — extensions/amp-base-carousel/0.1/dimensions.js:105 · src/bento/components/bento-base-carousel/1.0/dimensions.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.
  • Duplicated block (46 lines × 2 locations) extensions/amp-timeago/1.0/storybook/Basic.js:68 — extensions/amp-timeago/1.0/storybook/Basic.js:68 · extensions/amp-timeago/1.0/storybook/Basic.js:114 — 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.
AC3 · Page structure · Empty <h3> heading · ×2
  • Empty <h3> heading REDACTED:1551 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
  • Empty <h3> heading REDACTED:1554 — An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×2
  • Animation without a prefers-reduced-motion guard src/bento/components/bento-accordion/1.0/animations.js:38 — `content.animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
  • Animation without a prefers-reduced-motion guard src/bento/components/bento-accordion/1.0/animations.js:68 — `content.animate()` moves (`Web Animations API keyframes`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D1 · Cyclomatic Complexity · index.default (cyclomatic 23) · ×2
  • index.default (cyclomatic 23) build-system/babel-plugins/babel-plugin-jsx-style-object/index.js:67 — index.default has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 4 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (transformProp, replaceExpression, mergeBinaryConcat, …). 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.
  • index.default (cyclomatic 23) build-system/babel-plugins/babel-plugin-transform-function-declarations/index.js:10 — index.default has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 6 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.
D1 · Cyclomatic Complexity · flexible-ad-slot-utils.getElementWidthVisitor.<returned closure> (cyclomatic 17) · ×2
  • flexible-ad-slot-utils.getElementWidthVisitor.<returned closure> (cyclomatic 17) extensions/amp-ad-network-doubleclick-impl/0.1/flexible-ad-slot-utils.js:25 — flexible-ad-slot-utils.getElementWidthVisitor.<returned closure> 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.
  • flexible-ad-slot-utils.getElementWidthVisitor.<returned closure> (cyclomatic 17) extensions/amp-ad-network-valueimpression-impl/0.1/flexible-ad-slot-utils.js:25 — flexible-ad-slot-utils.getElementWidthVisitor.<returned closure> 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.
D1 · Cyclomatic Complexity · AmpSidebar.buildCallback (cyclomatic 17) · ×2
  • AmpSidebar.buildCallback (cyclomatic 17) extensions/amp-sidebar/0.1/amp-sidebar.js:144 — AmpSidebar.buildCallback has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • AmpSidebar.buildCallback (cyclomatic 17) extensions/amp-sidebar/0.2/amp-sidebar.js:145 — AmpSidebar.buildCallback has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · index.transformAjvCode · ×2
  • index.transformAjvCode::hoistProperties (cognitive 36) build-system/compile/json-schema/index.js:273 — index.transformAjvCode::hoistProperties has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 6 (12 pts), boolean chains 3 (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. This shape REPEATS in the file: one other method here (index.transformAjvCode::isMemberExpressionLeftwards) 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.
  • index.transformAjvCode::isMemberExpressionLeftwards (cognitive 16) build-system/compile/json-schema/index.js:207 — index.transformAjvCode::isMemberExpressionLeftwards has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, 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. This shape REPEATS in the file: one other method here (index.transformAjvCode::hoistProperties) 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.
D2 · Cognitive Complexity · index.default (cognitive 28) · ×2
  • index.default (cognitive 28) build-system/babel-plugins/babel-plugin-jsx-style-object/index.js:67 — index.default has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 4 function items inside it that branch (transformProp, mergeBinaryConcat, replaceExpression, …). 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.
  • index.default (cognitive 28) build-system/babel-plugins/babel-plugin-transform-jss/index.js:41 — index.default has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, boolean chains 6, loops 1, ternaries 1. Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to 9 function items inside it that branch (findImportDeclaration, replaceObjectPattern, replaceVariableDeclaratorRefs, …). 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.
D2 · Cognitive Complexity · index.default (cognitive 20) · ×2
  • index.default (cognitive 20) build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js:15 — index.default has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, ternaries 1 (2 pts), error handling 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (resolveImportedEnum, resolveEnum, inlineIsEnumValue, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • index.default (cognitive 20) build-system/babel-plugins/babel-plugin-transform-stringish-literals/index.js:8 — index.default has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2, boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (joinMaybeTemplateLiteral, whichCloneQuasi, joinTemplateLiterals). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.default (cognitive 16) · ×2
  • index.default (cognitive 16) build-system/babel-plugins/babel-plugin-amp-mode-transformer/index.js:11 — index.default has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4 (nesting depth added 2). Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
  • index.default (cognitive 16) build-system/babel-plugins/babel-plugin-transform-amp-asserts/index.js:22 — index.default has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (eliminate, isRemovableMethod). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D5 · Coupling · Unstable project //cpp/htmlparser · ×2
  • Unstable project //cpp/htmlparser:parser — //cpp/htmlparser:parser has instability 0.92 with 1 dependents.
  • Unstable project //cpp/htmlparser:tokenizer — //cpp/htmlparser:tokenizer has instability 0.83 with 1 dependents.
R10 · Code Duplication · Duplicated block with local edits (47 matched lines × 2 locations) · ×2
  • Duplicated block with local edits (47 matched lines × 2 locations) extensions/amp-lightbox/1.0/amp-lightbox.js:21 — extensions/amp-lightbox/1.0/amp-lightbox.js:21 · extensions/amp-sidebar/1.0/amp-sidebar.js:14 — the two spans are one implementation copied and then locally edited — 302 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 (47 matched lines × 2 locations) extensions/amp-story-interactive/0.1/amp-story-interactive-img-quiz.js:76 — extensions/amp-story-interactive/0.1/amp-story-interactive-img-quiz.js:76 · extensions/amp-story-interactive/0.1/amp-story-interactive-quiz.js:73 — the two spans are one implementation copied and then locally edited — 240 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.
S1 · Web-Security Posture · Weak hash algorithm · ×2
  • Weak hash algorithm build-system/common/esbuild-babel.js:205 — 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+ (`createHash("sha256")`) 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 build-system/common/transform-cache.js:81 — 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+ (`createHash("sha256")`) 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.
SC1 · Supply-chain hygiene · JavaScript dependencies are not locked · ×2
  • JavaScript dependencies are not locked extensions/amp-access/0.1/iframe-api/REDACTED:16 — extensions/amp-access/0.1/iframe-api/REDACTED declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / 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.
  • JavaScript dependencies are not locked third_party/amp-toolbox-cache-url/REDACTED:30 — third_party/amp-toolbox-cache-url/REDACTED declares dependencies that no committed lockfile resolves — there is no REDACTED / yarn.lock / 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) REDACTED:85 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:94 — `if err != nil` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
AC2 · Forms & labels · <DatePicker> field component without a label · ×1
  • <DatePicker> field component without a label extensions/amp-date-picker/1.0/component/component.tsx:38 — This UI-library field component has no label / aria-label / aria-labelledby / id at this call site, and nothing written inside it here carries one either (a name prop is the form-submission key, not a label; an id, even one the component sets on what it renders, names nothing until a label points at it) — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed.
AC4 · Keyboard semantics · Modal dialog does not manage focus · ×1
  • Modal dialog does not manage focus extensions/amp-story-interactive/0.1/interactive-disclaimer.js:27 — This <div role="alertdialog"> is a modal dialog, but nothing moves focus into it when it opens and nothing keeps focus inside it while it is open, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native <dialog> opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (2.9 · ×1
  • Low contrast colour pair in CSS (2.9:1) extensions/amp-playbuzz/0.1/amp-playbuzz.css:12 — `.pb-overflow button` sets color: #009CFF on background-color: white — 2.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D1 · Cyclomatic Complexity · custom-element.createBaseCustomElementClass (cyclomatic 233) · ×1
  • custom-element.createBaseCustomElementClass (cyclomatic 233) src/custom-element.js:123 — custom-element.createBaseCustomElementClass has cyclomatic complexity 233 (threshold 15). Of this number, 188 points are the body's own statements and 45 belong to 19 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ResourcesImpl.discoverWork_ (cyclomatic 66) · ×1
  • ResourcesImpl.discoverWork_ (cyclomatic 66) src/service/resources-impl.js:1048 — ResourcesImpl.discoverWork_ has cyclomatic complexity 66 (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.
D1 · Cyclomatic Complexity · component.BentoAutocomplete (cyclomatic 62) · ×1
  • component.BentoAutocomplete (cyclomatic 62) src/bento/components/bento-autocomplete/1.0/component/component.tsx:43 — component.BentoAutocomplete has cyclomatic complexity 62 (threshold 15). Most of this is not in the body itself: 2 of the 62 points are its own statements and the rest belongs to 18 function literals inside it that branch (lines 345, 266, 208, …). 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.
D1 · Cyclomatic Complexity · BindExpression.eval_ (cyclomatic 60) · ×1
  • BindExpression.eval_ (cyclomatic 60) extensions/amp-bind/0.1/bind-expression.js:325 — BindExpression.eval_ has cyclomatic complexity 60 (threshold 15). Of this number, 59 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.
D1 · Cyclomatic Complexity · ResourcesImpl.mutateWork_ (cyclomatic 54) · ×1
  • ResourcesImpl.mutateWork_ (cyclomatic 54) src/service/resources-impl.js:712 — ResourcesImpl.mutateWork_ has cyclomatic complexity 54 (threshold 15). Of this number, 43 points are the body's own statements and 11 belong to 4 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.
D1 · Cyclomatic Complexity · getAdUrl (cyclomatic 48) · ×1
  • getAdUrl (cyclomatic 48) extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:193 — getAdUrl has cyclomatic complexity 48 (threshold 15). Most of this is not in the body itself: 10 of the 48 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 244, 203, 207, …). 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.
D1 · Cyclomatic Complexity · error-reporting.getErrorReportData (cyclomatic 46) · ×1
  • error-reporting.getErrorReportData (cyclomatic 46) src/error-reporting.js:490 — error-reporting.getErrorReportData has cyclomatic complexity 46 (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.
D1 · Cyclomatic Complexity · date-range-picker.DateRangePickerWithRef (cyclomatic 46) · ×1
  • date-range-picker.DateRangePickerWithRef (cyclomatic 46) extensions/amp-date-picker/1.0/component/date-range-picker.tsx:27 — date-range-picker.DateRangePickerWithRef has cyclomatic complexity 46 (threshold 15). Most of this is not in the body itself: 4 of the 46 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 136, 101, 303, …). 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.
D1 · Cyclomatic Complexity · component.BentoBaseCarouselWithRef (cyclomatic 44) · ×1
  • component.BentoBaseCarouselWithRef (cyclomatic 44) src/bento/components/bento-base-carousel/1.0/component.js:73 — component.BentoBaseCarouselWithRef has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 9 of the 44 points are its own statements and the rest belongs to 12 function items inside it that branch (disableForDir, a function literal at line 175, a function literal at line 140, …). 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.
D1 · Cyclomatic Complexity · sanitizer.sanitizeHtml (cyclomatic 39) · ×1
  • sanitizer.sanitizeHtml (cyclomatic 39) src/sanitizer.js:67 — sanitizer.sanitizeHtml has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 88, a function literal at line 68, emit, …). 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.
D1 · Cyclomatic Complexity · initiateAdRequest (cyclomatic 39) · ×1
  • initiateAdRequest (cyclomatic 39) extensions/amp-a4a/0.1/amp-a4a.js:684 — initiateAdRequest has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 5 of the 39 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 844, 728, 777, …). 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.
D1 · Cyclomatic Complexity · static-layout.getEffectiveLayoutInternal (cyclomatic 38) · ×1
  • static-layout.getEffectiveLayoutInternal (cyclomatic 38) src/core/static-layout.js:238 — static-layout.getEffectiveLayoutInternal has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AmpSlikeplayer.onMessage_ (cyclomatic 34) · ×1
  • AmpSlikeplayer.onMessage_ (cyclomatic 34) extensions/amp-slikeplayer/0.1/amp-slikeplayer.js:307 — AmpSlikeplayer.onMessage_ has cyclomatic complexity 34 (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.
D1 · Cyclomatic Complexity · index.default (cyclomatic 32) · ×1
  • index.default (cyclomatic 32) build-system/babel-plugins/babel-plugin-transform-jss/index.js:41 — index.default has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 10 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (findImportDeclaration, replaceObjectPattern, a function literal at line 151, …). 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.
D1 · Cyclomatic Complexity · ParserTokenizer.next_ (cyclomatic 32) · ×1
  • ParserTokenizer.next_ (cyclomatic 32) src/service/action-impl.js:1276 — ParserTokenizer.next_ 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.
D1 · Cyclomatic Complexity · getAdUrl (cyclomatic 32) · ×1
  • getAdUrl (cyclomatic 32) extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:279 — getAdUrl has cyclomatic complexity 32 (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.
D1 · Cyclomatic Complexity · media-query-props.parseMediaQueryListExpr (cyclomatic 31) · ×1
  • media-query-props.parseMediaQueryListExpr (cyclomatic 31) src/core/dom/media-query-props.js:127 — media-query-props.parseMediaQueryListExpr has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 1 of the 31 points is its own statement and the rest belongs to one function literal inside it that branches (line 131). 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.
D1 · Cyclomatic Complexity · validator_gen_js.GenerateValidatorGeneratedJs (cyclomatic 31) · ×1
  • validator_gen_js.GenerateValidatorGeneratedJs (cyclomatic 31) REDACTED:690 — validator_gen_js.GenerateValidatorGeneratedJs 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.
D1 · Cyclomatic Complexity · ima-video.onMessage (cyclomatic 30) · ×1
  • ima-video.onMessage (cyclomatic 30) REDACTED:1375 — ima-video.onMessage 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.
D1 · Cyclomatic Complexity · MultidocManager.mergeShadowHead_ (cyclomatic 29) · ×1
  • MultidocManager.mergeShadowHead_ (cyclomatic 29) src/multidoc-manager.js:317 — MultidocManager.mergeShadowHead_ 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.
D1 · Cyclomatic Complexity · initialize (cyclomatic 28) · ×1
  • initialize (cyclomatic 28) src/service/url-replacements-impl.js:125 — initialize 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 67 function items inside it that branch (a function literal at line 330, a function literal at line 448, a function literal at line 185, …). 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.
D1 · Cyclomatic Complexity · date-picker-common.withDatePickerCommon (cyclomatic 27) · ×1
  • date-picker-common.withDatePickerCommon (cyclomatic 27) extensions/amp-date-picker/0.1/date-picker-common.js:11 — date-picker-common.withDatePickerCommon has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 4 of the 27 points are its own statements and the rest belongs to 8 function items inside it that branch (isOutsideRange, a function literal at line 154, isDayBlocked, …). 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.
D1 · Cyclomatic Complexity · AmpJWPlayer.onMessage_ (cyclomatic 27) · ×1
  • AmpJWPlayer.onMessage_ (cyclomatic 27) REDACTED:452 — AmpJWPlayer.onMessage_ has cyclomatic complexity 27 (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.
D1 · Cyclomatic Complexity · component.SelectorWithRef (cyclomatic 27) · ×1
  • component.SelectorWithRef (cyclomatic 27) extensions/amp-selector/1.0/component.js:43 — component.SelectorWithRef has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 219, 70, 160, …). 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.
D1 · Cyclomatic Complexity · FixedLayer.update (cyclomatic 27) · ×1
  • FixedLayer.update (cyclomatic 27) src/service/fixed-layer.js:396 — FixedLayer.update has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 418, 525). 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.
D1 · Cyclomatic Complexity · main.handler (cyclomatic 27) · ×1
  • main.handler (cyclomatic 27) REDACTED:29 — main.handler has cyclomatic complexity 27 (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.
D1 · Cyclomatic Complexity · component.BentoImageSliderWithRef (cyclomatic 26) · ×1
  • component.BentoImageSliderWithRef (cyclomatic 26) extensions/amp-image-slider/1.0/component.js:64 — component.BentoImageSliderWithRef has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 302, 433, 378, …). 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.
D1 · Cyclomatic Complexity · component.BentoYoutubeWithRef (cyclomatic 26) · ×1
  • component.BentoYoutubeWithRef (cyclomatic 26) REDACTED:69 — component.BentoYoutubeWithRef has cyclomatic complexity 26 (threshold 15). Of this number, 14 points are the body's own statements and 12 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · Expander.parseUrlRecursively_ · ×1
  • Expander.parseUrlRecursively_::evaluateNextLevel (cyclomatic 26) src/service/url-expander/expander.js:144 — Expander.parseUrlRecursively_::evaluateNextLevel 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.
D1 · Cyclomatic Complexity · Bind.applyBinding_ (cyclomatic 25) · ×1
  • Bind.applyBinding_ (cyclomatic 25) extensions/amp-bind/0.1/bind-impl.js:1306 — Bind.applyBinding_ 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.
D1 · Cyclomatic Complexity · GoogleSubscriptionsPlatform.constructor (cyclomatic 25) · ×1
  • GoogleSubscriptionsPlatform.constructor (cyclomatic 25) extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js:103 — GoogleSubscriptionsPlatform.constructor has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 198, 228, 143, …). 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.
D1 · Cyclomatic Complexity · parse-props.parsePropDefs (cyclomatic 25) · ×1
  • parse-props.parsePropDefs (cyclomatic 25) src/preact/parse-props.js:167 — parse-props.parsePropDefs 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.
D1 · Cyclomatic Complexity · Purifier.addPurifyHooks_ (cyclomatic 25) · ×1
  • Purifier.addPurifyHooks_ (cyclomatic 25) src/purifier/index.js:212 — Purifier.addPurifyHooks_ 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 5 function items inside it that branch (uponSanitizeAttribute, uponSanitizeElement, a function literal at line 382, …). 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.
D1 · Cyclomatic Complexity · FakeWindow.constructor (cyclomatic 25) · ×1
  • FakeWindow.constructor (cyclomatic 25) REDACTED:21 — FakeWindow.constructor has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · rerender_ (cyclomatic 25) · ×1
  • rerender_ (cyclomatic 25) src/preact/base-element.js:611 — rerender_ 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.
D1 · Cyclomatic Complexity · error-reporting.reportError (cyclomatic 24) · ×1
  • error-reporting.reportError (cyclomatic 24) src/error-reporting.js:154 — error-reporting.reportError has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · no-style-display.default (cyclomatic 24) · ×1
  • no-style-display.default (cyclomatic 24) build-system/eslint-rules/no-style-display.js:3 — no-style-display.default has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 53, 16, 101). 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.
D1 · Cyclomatic Complexity · googlePageParameters (cyclomatic 24) · ×1
  • googlePageParameters (cyclomatic 24) ads/google/a4a/utils.js:270 — googlePageParameters 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 297, 277, 284). 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.
D1 · Cyclomatic Complexity · updateVisibilityState_ (cyclomatic 24) · ×1
  • updateVisibilityState_ (cyclomatic 24) src/service/ampdoc-impl.js:567 — updateVisibilityState_ has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · esbuildCompile (cyclomatic 24) · ×1
  • esbuildCompile (cyclomatic 24) build-system/tasks/helpers.js:259 — esbuildCompile has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (build, rebuild, splitWrapper, …). 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.
D1 · Cyclomatic Complexity · AmpA4A.getAmpAdMetadata (cyclomatic 23) · ×1
  • AmpA4A.getAmpAdMetadata (cyclomatic 23) extensions/amp-a4a/0.1/amp-a4a.js:2244 — AmpA4A.getAmpAdMetadata has cyclomatic complexity 23 (threshold 15). Of this number, 19 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.
D1 · Cyclomatic Complexity · ExternalReorderHeadTransformer.registerScript_ (cyclomatic 23) · ×1
  • ExternalReorderHeadTransformer.registerScript_ (cyclomatic 23) extensions/amp-ad-network-fake-impl/0.1/external-reorder-head-transformer.js:130 — ExternalReorderHeadTransformer.registerScript_ has cyclomatic complexity 23 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · 4wmarketplace._4wmarketplace (cyclomatic 22) · ×1
  • 4wmarketplace._4wmarketplace (cyclomatic 22) ads/vendors/4wmarketplace.js:7 — 4wmarketplace._4wmarketplace has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 18, 62, 34). 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.
D1 · Cyclomatic Complexity · pr-check.prCheck (cyclomatic 22) · ×1
  • pr-check.prCheck (cyclomatic 22) build-system/tasks/pr-check.js:25 — pr-check.prCheck has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · AmpAdNetworkDoubleclickImpl.getBlockParameters_ (cyclomatic 22) · ×1
  • AmpAdNetworkDoubleclickImpl.getBlockParameters_ (cyclomatic 22) REDACTED:689 — AmpAdNetworkDoubleclickImpl.getBlockParameters_ has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · AmpAdNetworkDoubleclickImpl.onCreativeRender (cyclomatic 22) · ×1
  • AmpAdNetworkDoubleclickImpl.onCreativeRender (cyclomatic 22) REDACTED:1291 — AmpAdNetworkDoubleclickImpl.onCreativeRender has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VideoEventTracker.add (cyclomatic 22) · ×1
  • VideoEventTracker.add (cyclomatic 22) extensions/amp-analytics/0.1/events.js:1387 — VideoEventTracker.add has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1415, 1508). 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.
D1 · Cyclomatic Complexity · sanitation.isValidAttr (cyclomatic 22) · ×1
  • sanitation.isValidAttr (cyclomatic 22) src/purifier/sanitation.js:363 — sanitation.isValidAttr has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · Performance.registerPerformanceObserver_ (cyclomatic 22) · ×1
  • Performance.registerPerformanceObserver_ (cyclomatic 22) src/service/performance-impl.js:394 — Performance.registerPerformanceObserver_ has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 9 of the 22 points are its own statements and the rest belongs to one function item inside it that branches (processEntry). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · parseActionMap (cyclomatic 22) · ×1
  • parseActionMap (cyclomatic 22) src/service/action-impl.js:949 — parseActionMap 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.
D1 · Cyclomatic Complexity · update · ×1
  • update::measure (cyclomatic 22) src/service/fixed-layer.js:418 — update::measure 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.
D1 · Cyclomatic Complexity · amp-ad-utils.getAmpAdMetadata (cyclomatic 21) · ×1
  • amp-ad-utils.getAmpAdMetadata (cyclomatic 21) extensions/amp-a4a/0.1/amp-ad-utils.js:45 — amp-ad-utils.getAmpAdMetadata has cyclomatic complexity 21 (threshold 15). Of this number, 17 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.
D1 · Cyclomatic Complexity · videonow.videonow (cyclomatic 21) · ×1
  • videonow.videonow (cyclomatic 21) ads/vendors/videonow.js:10 — videonow.videonow has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · amp4test.composeDocument (cyclomatic 21) · ×1
  • amp4test.composeDocument (cyclomatic 21) REDACTED:222 — amp4test.composeDocument has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · BaseCustomElement.connectedCallback (cyclomatic 21) · ×1
  • BaseCustomElement.connectedCallback (cyclomatic 21) src/custom-element.js:1148 — BaseCustomElement.connectedCallback 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.
D1 · Cyclomatic Complexity · MeasureScanner.createKeyframes_ (cyclomatic 21) · ×1
  • MeasureScanner.createKeyframes_ (cyclomatic 21) extensions/amp-animation/0.1/web-animations.js:463 — MeasureScanner.createKeyframes_ 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.
D1 · Cyclomatic Complexity · document-submit.onDocumentFormSubmit_ (cyclomatic 21) · ×1
  • document-submit.onDocumentFormSubmit_ (cyclomatic 21) src/document-submit.js:36 — document-submit.onDocumentFormSubmit_ has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · AmpGeo.findCountry_ (cyclomatic 21) · ×1
  • AmpGeo.findCountry_ (cyclomatic 21) extensions/amp-geo/0.1/amp-geo.js:181 — AmpGeo.findCountry_ has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 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.
D1 · Cyclomatic Complexity · component.BentoIframe (cyclomatic 21) · ×1
  • component.BentoIframe (cyclomatic 21) extensions/amp-iframe/1.0/component.js:24 — component.BentoIframe has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 101, a function literal at line 57, a function literal at line 169, …). 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.
D1 · Cyclomatic Complexity · component.BentoAccordionWithRef (cyclomatic 21) · ×1
  • component.BentoAccordionWithRef (cyclomatic 21) src/bento/components/bento-accordion/1.0/component.js:49 — component.BentoAccordionWithRef has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 6 function literals inside it that branch (lines 152, 134, 172, …). 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.
D1 · Cyclomatic Complexity · component.VideoWrapperWithRef (cyclomatic 21) · ×1
  • component.VideoWrapperWithRef (cyclomatic 21) src/bento/components/bento-video/1.0/component.js:68 — component.VideoWrapperWithRef has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 175, 112, 166, …). 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.
D1 · Cyclomatic Complexity · createBaseCustomElementClass · ×1
  • createBaseCustomElementClass::connectedCallback (cyclomatic 21) src/custom-element.js:1148 — createBaseCustomElementClass::connectedCallback 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.
D1 · Cyclomatic Complexity · netletix.netletix (cyclomatic 20) · ×1
  • netletix.netletix (cyclomatic 20) ads/vendors/netletix.js:21 — netletix.netletix has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · index.default (cyclomatic 20) · ×1
  • index.default (cyclomatic 20) build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/index.js:15 — index.default has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 6 function items inside it that branch (resolveImportedEnum, resolveEnum, inlineIsEnumValue, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · enums.create.checkStaticEnumUse (cyclomatic 20) · ×1
  • enums.create.checkStaticEnumUse (cyclomatic 20) build-system/eslint-rules/enums.js:91 — enums.create.checkStaticEnumUse 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.
D1 · Cyclomatic Complexity · index.snapshotWebpages (cyclomatic 20) · ×1
  • index.snapshotWebpages (cyclomatic 20) REDACTED:349 — index.snapshotWebpages has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 395). 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.
D1 · Cyclomatic Complexity · form-proxy.setupLegacyProxy (cyclomatic 20) · ×1
  • form-proxy.setupLegacyProxy (cyclomatic 20) extensions/amp-form/0.1/form-proxy.js:147 — form-proxy.setupLegacyProxy 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.
D1 · Cyclomatic Complexity · component.BentoListWithRef (cyclomatic 20) · ×1
  • component.BentoListWithRef (cyclomatic 20) extensions/amp-list/1.0/component.js:101 — component.BentoListWithRef has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to 5 function items 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.
D1 · Cyclomatic Complexity · AmpStory.initializeListeners_ (cyclomatic 20) · ×1
  • AmpStory.initializeListeners_ (cyclomatic 20) extensions/amp-story/1.0/amp-story.js:657 — AmpStory.initializeListeners_ has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 850, 720, 809, …). 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.
D1 · Cyclomatic Complexity · static-layout.applyStaticLayout (cyclomatic 20) · ×1
  • static-layout.applyStaticLayout (cyclomatic 20) src/core/static-layout.js:100 — static-layout.applyStaticLayout has cyclomatic complexity 20 (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.
D1 · Cyclomatic Complexity · RealTimeConfigManager.validateRtcConfig_ (cyclomatic 20) · ×1
  • RealTimeConfigManager.validateRtcConfig_ (cyclomatic 20) src/service/real-time-config/real-time-config-impl.js:634 — RealTimeConfigManager.validateRtcConfig_ has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · dable.dable (cyclomatic 19) · ×1
  • dable.dable (cyclomatic 19) ads/vendors/dable.js:7 — dable.dable has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · nativo.nativo (cyclomatic 19) · ×1
  • nativo.nativo (cyclomatic 19) ads/vendors/nativo.js:22 — nativo.nativo has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 129, 66, 38, …). 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.
D1 · Cyclomatic Complexity · index.transformAjvCode · ×1
  • index.transformAjvCode::hoistProperties (cyclomatic 19) build-system/compile/json-schema/index.js:273 — index.transformAjvCode::hoistProperties 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.
D1 · Cyclomatic Complexity · AmpAdExit.buildCallback (cyclomatic 19) · ×1
  • AmpAdExit.buildCallback (cyclomatic 19) REDACTED:332 — AmpAdExit.buildCallback 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.
D1 · Cyclomatic Complexity · AmpAnalytics.registerTriggers_ (cyclomatic 19) · ×1
  • AmpAnalytics.registerTriggers_ (cyclomatic 19) REDACTED:299 — AmpAnalytics.registerTriggers_ has cyclomatic complexity 19 (threshold 15). 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, 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.
D1 · Cyclomatic Complexity · runtime.adoptShared (cyclomatic 19) · ×1
  • runtime.adoptShared (cyclomatic 19) src/runtime.js:71 — runtime.adoptShared has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AmpDatePicker.buildCallback (cyclomatic 19) · ×1
  • AmpDatePicker.buildCallback (cyclomatic 19) REDACTED:361 — AmpDatePicker.buildCallback 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.
D1 · Cyclomatic Complexity · AmpNextPage.buildCallback (cyclomatic 19) · ×1
  • AmpNextPage.buildCallback (cyclomatic 19) REDACTED:42 — AmpNextPage.buildCallback has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 61, 150). 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.
D1 · Cyclomatic Complexity · VisibilityObserver.getRelativePosFromSentinel (cyclomatic 19) · ×1
  • VisibilityObserver.getRelativePosFromSentinel (cyclomatic 19) extensions/amp-next-page/1.0/visibility-observer.js:329 — VisibilityObserver.getRelativePosFromSentinel has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · AmpStory.switchTo_ (cyclomatic 19) · ×1
  • AmpStory.switchTo_ (cyclomatic 19) extensions/amp-story/1.0/amp-story.js:1435 — AmpStory.switchTo_ has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · scroller.ScrollerWithRef (cyclomatic 19) · ×1
  • scroller.ScrollerWithRef (cyclomatic 19) src/bento/components/bento-base-carousel/1.0/scroller.js:43 — scroller.ScrollerWithRef has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 165, a function literal at line 177, a function literal at line 80, …). 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.
D1 · Cyclomatic Complexity · Values.calc_ (cyclomatic 19) · ×1
  • Values.calc_ (cyclomatic 19) src/core/context/values.js:556 — Values.calc_ 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.
D1 · Cyclomatic Complexity · index.experimentToggles (cyclomatic 19) · ×1
  • index.experimentToggles (cyclomatic 19) src/experiments/index.js:114 — index.experimentToggles 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.
D1 · Cyclomatic Complexity · ViewerImpl.constructor (cyclomatic 19) · ×1
  • ViewerImpl.constructor (cyclomatic 19) src/service/viewer-impl.js:72 — ViewerImpl.constructor has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AmpFixture.setup (cyclomatic 19) · ×1
  • AmpFixture.setup (cyclomatic 19) testing/describes.js:699 — AmpFixture.setup has cyclomatic complexity 19 (threshold 15). Of this number, 14 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 19) · ×1
  • (anonymous) (cyclomatic 19) REDACTED:998 — (anonymous) has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 1007, (anonymous)::writeChunk, a function literal at line 1111). 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.
D1 · Cyclomatic Complexity · url.parseUrlWithA (cyclomatic 18) · ×1
  • url.parseUrlWithA (cyclomatic 18) REDACTED:106 — url.parseUrlWithA 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.
D1 · Cyclomatic Complexity · affinity.affinity (cyclomatic 18) · ×1
  • affinity.affinity (cyclomatic 18) ads/vendors/affinity.js:7 — affinity.affinity has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to 5 function items inside it that branch (chkIsvalidContext, getAmpContext, jsonParse, …). 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.
D1 · Cyclomatic Complexity · checks.prBuildWorkflow (cyclomatic 18) · ×1
  • checks.prBuildWorkflow (cyclomatic 18) build-system/pr-check/checks.js:43 — checks.prBuildWorkflow 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.
D1 · Cyclomatic Complexity · AmpAddThis.buildCallback (cyclomatic 18) · ×1
  • AmpAddThis.buildCallback (cyclomatic 18) extensions/amp-addthis/0.1/amp-addthis.js:129 — AmpAddThis.buildCallback 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.
D1 · Cyclomatic Complexity · single-date-picker.SingleDatePickerWithRef (cyclomatic 18) · ×1
  • single-date-picker.SingleDatePickerWithRef (cyclomatic 18) extensions/amp-date-picker/1.0/component/single-date-picker.tsx:27 — single-date-picker.SingleDatePickerWithRef has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 71, 141, 87, …). 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.
D1 · Cyclomatic Complexity · AmpStory.buildCallback (cyclomatic 18) · ×1
  • AmpStory.buildCallback (cyclomatic 18) extensions/amp-story/1.0/amp-story.js:352 — AmpStory.buildCallback has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · DraggableDrawer.onSwipeY_ (cyclomatic 18) · ×1
  • DraggableDrawer.onSwipeY_ (cyclomatic 18) extensions/amp-story-page-attachment/0.1/amp-story-draggable-drawer.js:427 — DraggableDrawer.onSwipeY_ 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.
D1 · Cyclomatic Complexity · json.deepEquals (cyclomatic 18) · ×1
  • json.deepEquals (cyclomatic 18) src/core/types/object/json.js:83 — json.deepEquals 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.
D1 · Cyclomatic Complexity · Purifier.validateAttributeChange (cyclomatic 18) · ×1
  • Purifier.validateAttributeChange (cyclomatic 18) src/purifier/index.js:152 — Purifier.validateAttributeChange 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.
D1 · Cyclomatic Complexity · style-installer.insertStyleElement (cyclomatic 17) · ×1
  • style-installer.insertStyleElement (cyclomatic 17) src/style-installer.js:81 — style-installer.insertStyleElement 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.
D1 · Cyclomatic Complexity · AmpAdXOriginIframeHandler.init (cyclomatic 17) · ×1
  • AmpAdXOriginIframeHandler.init (cyclomatic 17) extensions/amp-ad/0.1/amp-ad-xorigin-iframe-handler.js:101 — AmpAdXOriginIframeHandler.init has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 5 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · index.default (cyclomatic 17) · ×1
  • index.default (cyclomatic 17) build-system/babel-plugins/babel-plugin-transform-stringish-literals/index.js:8 — index.default has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 3 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.
D1 · Cyclomatic Complexity · restrict-this-access.default (cyclomatic 17) · ×1
  • restrict-this-access.default (cyclomatic 17) build-system/eslint-rules/restrict-this-access.js:6 — restrict-this-access.default has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VisibilityTracker.add (cyclomatic 17) · ×1
  • VisibilityTracker.add (cyclomatic 17) extensions/amp-analytics/0.1/events.js:1574 — VisibilityTracker.add has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VisibilityManager.createModelAndListen_ (cyclomatic 17) · ×1
  • VisibilityManager.createModelAndListen_ (cyclomatic 17) extensions/amp-analytics/0.1/visibility-manager.js:321 — VisibilityManager.createModelAndListen_ 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.
D1 · Cyclomatic Complexity · AmpAutocomplete.keyDownHandler_ (cyclomatic 17) · ×1
  • AmpAutocomplete.keyDownHandler_ (cyclomatic 17) REDACTED:1294 — AmpAutocomplete.keyDownHandler_ has cyclomatic complexity 17 (threshold 15). Of this number, 16 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.
D1 · Cyclomatic Complexity · AmpForm.maybeInitializeFromUrl_ (cyclomatic 17) · ×1
  • AmpForm.maybeInitializeFromUrl_ (cyclomatic 17) extensions/amp-form/0.1/amp-form.js:1329 — AmpForm.maybeInitializeFromUrl_ has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (maybeFillField, a function literal at line 1390). 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.
D1 · Cyclomatic Complexity · AmpOnetapGoogle.handleIntermediateIframeMessage_ (cyclomatic 17) · ×1
  • AmpOnetapGoogle.handleIntermediateIframeMessage_ (cyclomatic 17) extensions/amp-onetap-google/0.1/amp-onetap-google.js:105 — AmpOnetapGoogle.handleIntermediateIframeMessage_ 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.
D1 · Cyclomatic Complexity · component.BentoSelectorOption (cyclomatic 17) · ×1
  • component.BentoSelectorOption (cyclomatic 17) extensions/amp-selector/1.0/component.js:275 — component.BentoSelectorOption has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 310, 322, 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.
D1 · Cyclomatic Complexity · sidebar-animations-hook.useSidebarAnimation (cyclomatic 17) · ×1
  • sidebar-animations-hook.useSidebarAnimation (cyclomatic 17) extensions/amp-sidebar/1.0/sidebar-animations-hook.js:45 — sidebar-animations-hook.useSidebarAnimation has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 60). 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.
D1 · Cyclomatic Complexity · AmpVideoIframe.onMessage_ (cyclomatic 17) · ×1
  • AmpVideoIframe.onMessage_ (cyclomatic 17) REDACTED:271 — AmpVideoIframe.onMessage_ 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.
D1 · Cyclomatic Complexity · AmpYoutube.handleYoutubeMessage_ (cyclomatic 17) · ×1
  • AmpYoutube.handleYoutubeMessage_ (cyclomatic 17) REDACTED:388 — AmpYoutube.handleYoutubeMessage_ 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.
D1 · Cyclomatic Complexity · FixedLayer.setupElement_ (cyclomatic 17) · ×1
  • FixedLayer.setupElement_ (cyclomatic 17) src/service/fixed-layer.js:652 — FixedLayer.setupElement_ 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.
D1 · Cyclomatic Complexity · FixedLayer.mutateElement_ (cyclomatic 17) · ×1
  • FixedLayer.mutateElement_ (cyclomatic 17) src/service/fixed-layer.js:785 — FixedLayer.mutateElement_ 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.
D1 · Cyclomatic Complexity · tokenizeMethodArguments (cyclomatic 17) · ×1
  • tokenizeMethodArguments (cyclomatic 17) src/service/action-impl.js:1047 — tokenizeMethodArguments 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.
D1 · Cyclomatic Complexity · yotpo.yotpo (cyclomatic 16) · ×1
  • yotpo.yotpo (cyclomatic 16) 3p/yotpo.js:258 — yotpo.yotpo has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · core-dom-jsx.default.isValidStyleOrClassValue (cyclomatic 16) · ×1
  • core-dom-jsx.default.isValidStyleOrClassValue (cyclomatic 16) build-system/eslint-rules/core-dom-jsx.js:14 — core-dom-jsx.default.isValidStyleOrClassValue 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.
D1 · Cyclomatic Complexity · sra-utils.getTargetingAndExclusions (cyclomatic 16) · ×1
  • sra-utils.getTargetingAndExclusions (cyclomatic 16) extensions/amp-ad-network-doubleclick-impl/0.1/sra-utils.js:187 — sra-utils.getTargetingAndExclusions has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 3 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.
D1 · Cyclomatic Complexity · lojson.getLojsonData (cyclomatic 16) · ×1
  • lojson.getLojsonData (cyclomatic 16) extensions/amp-addthis/0.1/addthis-utils/lojson.js:63 — lojson.getLojsonData 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.
D1 · Cyclomatic Complexity · VisibilityModel.updateCounters_ (cyclomatic 16) · ×1
  • VisibilityModel.updateCounters_ (cyclomatic 16) extensions/amp-analytics/0.1/visibility-model.js:381 — VisibilityModel.updateCounters_ 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.
D1 · Cyclomatic Complexity · AmpScript.layoutCallback (cyclomatic 16) · ×1
  • AmpScript.layoutCallback (cyclomatic 16) extensions/amp-script/0.1/amp-script.js:248 — AmpScript.layoutCallback has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CssMinMaxNode.calc (cyclomatic 16) · ×1
  • CssMinMaxNode.calc (cyclomatic 16) extensions/amp-animation/0.1/parsers/css-expr-ast.js:1279 — CssMinMaxNode.calc has cyclomatic complexity 16 (threshold 15). Of this number, 8 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Carousel.advance (cyclomatic 16) · ×1
  • Carousel.advance (cyclomatic 16) extensions/amp-base-carousel/0.1/carousel.js:382 — Carousel.advance 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.
D1 · Cyclomatic Complexity · AmpBrightcove.handlePlayerMessage_ (cyclomatic 16) · ×1
  • AmpBrightcove.handlePlayerMessage_ (cyclomatic 16) extensions/amp-brightcove/0.1/amp-brightcove.js:202 — AmpBrightcove.handlePlayerMessage_ 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.
D1 · Cyclomatic Complexity · AmpConsent.enableExternalInteractions_ (cyclomatic 16) · ×1
  • AmpConsent.enableExternalInteractions_ (cyclomatic 16) extensions/amp-consent/0.1/amp-consent.js:300 — AmpConsent.enableExternalInteractions_ has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 301). 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.
D1 · Cyclomatic Complexity · AmpDailymotion.handleEvents_ (cyclomatic 16) · ×1
  • AmpDailymotion.handleEvents_ (cyclomatic 16) extensions/amp-dailymotion/0.1/amp-dailymotion.js:155 — AmpDailymotion.handleEvents_ has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · SwipeRecognizer.onTouchMove (cyclomatic 16) · ×1
  • SwipeRecognizer.onTouchMove (cyclomatic 16) src/gesture-recognizers.js:278 — SwipeRecognizer.onTouchMove 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.
D1 · Cyclomatic Complexity · Shim.updateAttributes (cyclomatic 16) · ×1
  • Shim.updateAttributes (cyclomatic 16) src/bento/components/bento-mega-menu/1.0/component/Shim.tsx:47 — Shim.updateAttributes has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 52). 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.
D1 · Cyclomatic Complexity · Resource.measure (cyclomatic 16) · ×1
  • Resource.measure (cyclomatic 16) src/service/resource.js:421 — Resource.measure 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.
D1 · Cyclomatic Complexity · FixedLayer.setup (cyclomatic 16) · ×1
  • FixedLayer.setup (cyclomatic 16) src/service/fixed-layer.js:150 — FixedLayer.setup 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.
D1 · Cyclomatic Complexity · navigationKeyDownHandler_ (cyclomatic 16) · ×1
  • navigationKeyDownHandler_ (cyclomatic 16) extensions/amp-selector/0.1/amp-selector.js:521 — navigationKeyDownHandler_ has cyclomatic complexity 16 (threshold 15). Of this number, 9 points are the body's own statements and 7 belong to one function literal 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.
D2 · Cognitive Complexity · custom-element.createBaseCustomElementClass (cognitive 259) · ×1
  • custom-element.createBaseCustomElementClass (cognitive 259) src/custom-element.js:123 — custom-element.createBaseCustomElementClass has cognitive complexity 259 (threshold 15). Drivers by points: if/else 143 (180 pts), boolean chains 49, ternaries 22 (23 pts), error handling 3 (4 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 40). Of this number, 223 points are the body's own statements and 36 belong to 19 function literals 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.
D2 · Cognitive Complexity · mutateWork_ (cognitive 114) · ×1
  • mutateWork_ (cognitive 114) src/service/resources-impl.js:712 — mutateWork_ has cognitive complexity 114 (threshold 15). Drivers by points: if/else 31 (84 pts), boolean chains 13, ternaries 3 (11 pts), loops 2 (6 pts) (nesting depth added 65). Of this number, 80 points are the body's own statements and 34 belong to 5 function items inside it that branch. 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.
D2 · Cognitive Complexity · ResourcesImpl.discoverWork_ (cognitive 84) · ×1
  • ResourcesImpl.discoverWork_ (cognitive 84) src/service/resources-impl.js:1048 — ResourcesImpl.discoverWork_ has cognitive complexity 84 (threshold 15). Drivers by points: if/else 21 (52 pts), boolean chains 17, loops 7 (14 pts), ternaries 1 (nesting depth added 38). 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.
D2 · Cognitive Complexity · sanitizer.sanitizeHtml (cognitive 72) · ×1
  • sanitizer.sanitizeHtml (cognitive 72) src/sanitizer.js:67 — sanitizer.sanitizeHtml has cognitive complexity 72 (threshold 15). Drivers by points: if/else 30 (52 pts), loops 4 (8 pts), ternaries 3 (7 pts), boolean chains 5 (nesting depth added 30). None of this is in the body itself: all 72 points belong to 4 function items inside it that branch (a function literal at line 88, a function literal at line 68, emit, …). 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.
D2 · Cognitive Complexity · component.BentoAutocomplete (cognitive 68) · ×1
  • component.BentoAutocomplete (cognitive 68) src/bento/components/bento-autocomplete/1.0/component/component.tsx:43 — component.BentoAutocomplete has cognitive complexity 68 (threshold 15). Drivers by points: if/else 34 (48 pts), boolean chains 14, ternaries 3 (4 pts), match/switch 2 (nesting depth added 15). Most of this is not in the body itself: 1 of the 68 points is its own statement and the rest belongs to 18 function literals inside it that branch (lines 345, 208, 92, …). 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.
D2 · Cognitive Complexity · validator_gen_js.GenerateValidatorGeneratedJs (cognitive 66) · ×1
  • validator_gen_js.GenerateValidatorGeneratedJs (cognitive 66) REDACTED:690 — validator_gen_js.GenerateValidatorGeneratedJs has cognitive complexity 66 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 10 (22 pts), boolean chains 2 (nesting depth added 36). 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.
D2 · Cognitive Complexity · BindExpression.eval_ (cognitive 62) · ×1
  • BindExpression.eval_ (cognitive 62) extensions/amp-bind/0.1/bind-expression.js:325 — BindExpression.eval_ has cognitive complexity 62 (threshold 15). Drivers by points: if/else 21 (47 pts), boolean chains 8, ternaries 3 (6 pts), match/switch 1 (nesting depth added 29). Of this number, 60 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.
D2 · Cognitive Complexity · MultidocManager.mergeShadowHead_ (cognitive 57) · ×1
  • MultidocManager.mergeShadowHead_ (cognitive 57) src/multidoc-manager.js:317 — MultidocManager.mergeShadowHead_ has cognitive complexity 57 (threshold 15). Drivers by points: if/else 21 (47 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (3 pts) (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.
D2 · Cognitive Complexity · index.snapshotWebpages (cognitive 53) · ×1
  • index.snapshotWebpages (cognitive 53) REDACTED:349 — index.snapshotWebpages has cognitive complexity 53 (threshold 15). Drivers by points: if/else 8 (22 pts), error handling 4 (14 pts), ternaries 3 (9 pts), loops 4 (7 pts), boolean chains 1 (nesting depth added 33). Most of this is not in the body itself: 12 of the 53 points are its own statements and the rest belongs to one function literal inside it that branches (line 395). 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.
D2 · Cognitive Complexity · form-proxy.setupLegacyProxy (cognitive 52) · ×1
  • form-proxy.setupLegacyProxy (cognitive 52) extensions/amp-form/0.1/form-proxy.js:147 — form-proxy.setupLegacyProxy has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (46 pts), boolean chains 5, loops 1 (nesting depth added 29). 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.
D2 · Cognitive Complexity · Expander.parseUrlRecursively_ · ×1
  • Expander.parseUrlRecursively_::evaluateNextLevel (cognitive 52) src/service/url-expander/expander.js:144 — Expander.parseUrlRecursively_::evaluateNextLevel has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (41 pts), boolean chains 6, ternaries 1 (4 pts), 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.
D2 · Cognitive Complexity · next_ (cognitive 52) · ×1
  • next_ (cognitive 52) src/service/action-impl.js:1276 — next_ has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (35 pts), loops 5 (9 pts), boolean chains 6, ternaries 1 (2 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.
D2 · Cognitive Complexity · getErrorReportData (cognitive 51) · ×1
  • getErrorReportData (cognitive 51) src/error-reporting.js:490 — getErrorReportData has cognitive complexity 51 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 14, ternaries 7 (8 pts), loops 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.
D2 · Cognitive Complexity · main.handler (cognitive 50) · ×1
  • main.handler (cognitive 50) REDACTED:29 — main.handler has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (44 pts), boolean chains 4, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · getAdUrl (cognitive 48) · ×1
  • getAdUrl (cognitive 48) extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:193 — getAdUrl has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 19, ternaries 17 (18 pts), if/else 9 (10 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 6 of the 48 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 244, 203, 207, …). 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.
D2 · Cognitive Complexity · parse-props.parsePropDefs (cognitive 47) · ×1
  • parse-props.parsePropDefs (cognitive 47) src/preact/parse-props.js:167 — parse-props.parsePropDefs has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (26 pts), ternaries 3 (11 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MeasureScanner.createKeyframes_ (cognitive 46) · ×1
  • MeasureScanner.createKeyframes_ (cognitive 46) extensions/amp-animation/0.1/web-animations.js:463 — MeasureScanner.createKeyframes_ has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 5 (12 pts), ternaries 3 (8 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · component.BentoBaseCarouselWithRef (cognitive 46) · ×1
  • component.BentoBaseCarouselWithRef (cognitive 46) src/bento/components/bento-base-carousel/1.0/component.js:73 — component.BentoBaseCarouselWithRef has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (27 pts), boolean chains 14, ternaries 5 (nesting depth added 4). Most of this is not in the body itself: 8 of the 46 points are its own statements and the rest belongs to 12 function items inside it that branch (disableForDir, a function literal at line 140, a function literal at line 175, …). 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.
D2 · Cognitive Complexity · initiateAdRequest (cognitive 41) · ×1
  • initiateAdRequest (cognitive 41) extensions/amp-a4a/0.1/amp-a4a.js:684 — initiateAdRequest has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 10, error handling 5 (9 pts), ternaries 7 (8 pts), match/switch 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 4 of the 41 points are its own statements and the rest belongs to 13 function literals inside it that branch (lines 844, 728, 777, …). 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.
D2 · Cognitive Complexity · 4wmarketplace._4wmarketplace (cognitive 40) · ×1
  • 4wmarketplace._4wmarketplace (cognitive 40) ads/vendors/4wmarketplace.js:7 — 4wmarketplace._4wmarketplace has cognitive complexity 40 (threshold 15). Drivers by points: ternaries 12 (24 pts), if/else 6 (11 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 18). Of this number, 16 points are the body's own statements and 24 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · date-range-picker.DateRangePickerWithRef (cognitive 40) · ×1
  • date-range-picker.DateRangePickerWithRef (cognitive 40) extensions/amp-date-picker/1.0/component/date-range-picker.tsx:27 — date-range-picker.DateRangePickerWithRef has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (28 pts), boolean chains 12 (nesting depth added 2). Most of this is not in the body itself: 3 of the 40 points are its own statements and the rest belongs to 14 function literals inside it that branch (lines 136, 101, 345, …). 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.
D2 · Cognitive Complexity · media-query-props.parseMediaQueryListExpr (cognitive 40) · ×1
  • media-query-props.parseMediaQueryListExpr (cognitive 40) src/core/dom/media-query-props.js:127 — media-query-props.parseMediaQueryListExpr has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 8, loops 3 (7 pts), ternaries 1 (nesting depth added 15). None of this is in the body itself: all 40 points belong to one function literal inside it that branches (line 131). 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.
D2 · Cognitive Complexity · rerender_ (cognitive 40) · ×1
  • rerender_ (cognitive 40) src/preact/base-element.js:611 — rerender_ has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 4, ternaries 2 (3 pts), error handling 1, loops 1, other 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.
D2 · Cognitive Complexity · AmpAnalytics.registerTriggers_ (cognitive 39) · ×1
  • AmpAnalytics.registerTriggers_ (cognitive 39) REDACTED:299 — AmpAnalytics.registerTriggers_ has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 5, ternaries 1 (4 pts), loops 1 (nesting depth added 20). Of this number, 26 points are the body's own statements and 13 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.
D2 · Cognitive Complexity · component.BentoAccordionWithRef (cognitive 39) · ×1
  • component.BentoAccordionWithRef (cognitive 39) src/bento/components/bento-accordion/1.0/component.js:49 — component.BentoAccordionWithRef has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (26 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 16). Most of this is not in the body itself: 1 of the 39 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 152, 134, 172, …). 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.
D2 · Cognitive Complexity · Bind.applyBinding_ (cognitive 38) · ×1
  • Bind.applyBinding_ (cognitive 38) extensions/amp-bind/0.1/bind-impl.js:1306 — Bind.applyBinding_ has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 7, loops 1 (2 pts), match/switch 1 (nesting depth added 14). 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.
D2 · Cognitive Complexity · parseActionMap (cognitive 37) · ×1
  • parseActionMap (cognitive 37) src/service/action-impl.js:949 — parseActionMap has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 9, loops 4 (8 pts), ternaries 1 (4 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.
D2 · Cognitive Complexity · FixedLayer.update (cognitive 36) · ×1
  • FixedLayer.update (cognitive 36) src/service/fixed-layer.js:396 — FixedLayer.update has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 10, loops 5 (nesting depth added 9). Most of this is not in the body itself: 1 of the 36 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 418, 525). 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.
D2 · Cognitive Complexity · no-style-display.default (cognitive 33) · ×1
  • no-style-display.default (cognitive 33) build-system/eslint-rules/no-style-display.js:3 — no-style-display.default has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 5, loops 2 (nesting depth added 10). None of this is in the body itself: all 33 points belong to 3 function literals inside it that branch (lines 53, 16, 101). 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.
D2 · Cognitive Complexity · query-selector.default.getSelector (cognitive 33) · ×1
  • query-selector.default.getSelector (cognitive 33) build-system/eslint-rules/query-selector.js:114 — query-selector.default.getSelector has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 1 (2 pts) (nesting depth added 21). 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.
D2 · Cognitive Complexity · static-layout.getEffectiveLayoutInternal (cognitive 33) · ×1
  • static-layout.getEffectiveLayoutInternal (cognitive 33) src/core/static-layout.js:238 — static-layout.getEffectiveLayoutInternal has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 17, if/else 13, ternaries 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · AmpAccordion.toggle_ (cognitive 32) · ×1
  • AmpAccordion.toggle_ (cognitive 32) extensions/amp-accordion/0.1/amp-accordion.js:291 — AmpAccordion.toggle_ has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 3, ternaries 1 (nesting depth added 16). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 331, 339, 318). 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.
D2 · Cognitive Complexity · tokenizeMethodArguments (cognitive 32) · ×1
  • tokenizeMethodArguments (cognitive 32) src/service/action-impl.js:1047 — tokenizeMethodArguments has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (9 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · error-reporting.reportError (cognitive 31) · ×1
  • error-reporting.reportError (cognitive 31) src/error-reporting.js:154 — error-reporting.reportError has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 7, error handling 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.
D2 · Cognitive Complexity · AmpLiveList.insert_ (cognitive 31) · ×1
  • AmpLiveList.insert_ (cognitive 31) extensions/amp-live-list/0.1/amp-live-list.js:416 — AmpLiveList.insert_ has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2 (6 pts) (nesting depth added 18). None of this is in the body itself: all 31 points belong to one function literal inside it that branches (line 419). 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.
D2 · Cognitive Complexity · json.deepEquals (cognitive 31) · ×1
  • json.deepEquals (cognitive 31) src/core/types/object/json.js:83 — json.deepEquals has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 3 (9 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · getAdUrl (cognitive 31) · ×1
  • getAdUrl (cognitive 31) extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:279 — getAdUrl has cognitive complexity 31 (threshold 15). Drivers by points: ternaries 15, boolean chains 9, if/else 5, other 2. 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.
D2 · Cognitive Complexity · index.default (cognitive 30) · ×1
  • index.default (cognitive 30) build-system/babel-plugins/babel-plugin-transform-function-declarations/index.js:10 — index.default has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 8, loops 3 (5 pts) (nesting depth added 8). Of this number, 20 points are the body's own statements and 10 belong to 6 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.
D2 · Cognitive Complexity · enums.create.checkStaticEnumUse (cognitive 30) · ×1
  • enums.create.checkStaticEnumUse (cognitive 30) build-system/eslint-rules/enums.js:91 — enums.create.checkStaticEnumUse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · SwipeRecognizer.onTouchMove (cognitive 30) · ×1
  • SwipeRecognizer.onTouchMove (cognitive 30) src/gesture-recognizers.js:278 — SwipeRecognizer.onTouchMove has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · getUrlVariableRewriter_ (cognitive 30) · ×1
  • getUrlVariableRewriter_ (cognitive 30) REDACTED:195 — getUrlVariableRewriter_ has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (23 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 18). Most of this is not in the body itself: 9 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 244, (anonymous)::IFRAME_TRANSPORT_SIGNAL, ATTRIBUTION_REPORTING_STATUS, …). 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.
D2 · Cognitive Complexity · ima-video.onMessage (cognitive 29) · ×1
  • ima-video.onMessage (cognitive 29) REDACTED:1375 — ima-video.onMessage has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 5, match/switch 1, ternaries 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseCustomElement.connectedCallback (cognitive 29) · ×1
  • BaseCustomElement.connectedCallback (cognitive 29) src/custom-element.js:1148 — BaseCustomElement.connectedCallback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, error handling 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.
D2 · Cognitive Complexity · AmpGeo.findCountry_ (cognitive 29) · ×1
  • AmpGeo.findCountry_ (cognitive 29) extensions/amp-geo/0.1/amp-geo.js:181 — AmpGeo.findCountry_ has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 8, ternaries 1 (nesting depth added 8). Of this number, 23 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · AmpLiveList.removeOverflowItems_ (cognitive 29) · ×1
  • AmpLiveList.removeOverflowItems_ (cognitive 29) extensions/amp-live-list/0.1/amp-live-list.js:551 — AmpLiveList.removeOverflowItems_ has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (5 pts) (nesting depth added 15). Of this number, 19 points are the body's own statements and 10 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.
D2 · Cognitive Complexity · index.experimentToggles (cognitive 29) · ×1
  • index.experimentToggles (cognitive 29) src/experiments/index.js:114 — index.experimentToggles has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 6, loops 3 (6 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.
D2 · Cognitive Complexity · createBaseCustomElementClass · ×1
  • createBaseCustomElementClass::connectedCallback (cognitive 29) src/custom-element.js:1148 — createBaseCustomElementClass::connectedCallback has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, error handling 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.
D2 · Cognitive Complexity · update · ×1
  • update::measure (cognitive 29) src/service/fixed-layer.js:418 — update::measure has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 8, loops 4 (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.
D2 · Cognitive Complexity · constructor (cognitive 29) · ×1
  • constructor (cognitive 29) src/service/viewer-impl.js:72 — constructor has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 7, ternaries 1 (nesting depth added 7). Most of this is not in the body itself: 14 of the 29 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 191, 187, 217, …). 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.
D2 · Cognitive Complexity · VideoEventTracker.add (cognitive 28) · ×1
  • VideoEventTracker.add (cognitive 28) extensions/amp-analytics/0.1/events.js:1387 — VideoEventTracker.add has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 28 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1415, 1508). 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.
D2 · Cognitive Complexity · component.SelectorWithRef (cognitive 28) · ×1
  • component.SelectorWithRef (cognitive 28) extensions/amp-selector/1.0/component.js:43 — component.SelectorWithRef has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 3, ternaries 2, match/switch 1 (nesting depth added 4). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 70, 219, 105, …). 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.
D2 · Cognitive Complexity · esbuildCompile (cognitive 28) · ×1
  • esbuildCompile (cognitive 28) build-system/tasks/helpers.js:259 — esbuildCompile has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (15 pts), ternaries 4 (6 pts), error handling 2 (3 pts), other 3, boolean chains 1 (nesting depth added 5). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to 6 function items inside it that branch (build, rebuild, splitWrapper, …). 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.
D2 · Cognitive Complexity · dev-mode.devMode (cognitive 27) · ×1
  • dev-mode.devMode (cognitive 27) REDACTED:32 — dev-mode.devMode has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 3 (8 pts), ternaries 2 (6 pts), loops 2 (3 pts) (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.
D2 · Cognitive Complexity · SanitizerImpl.setStorage (cognitive 27) · ×1
  • SanitizerImpl.setStorage (cognitive 27) extensions/amp-script/0.1/amp-script.js:888 — SanitizerImpl.setStorage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 13). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 890). 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.
D2 · Cognitive Complexity · Shim.updateAttributes (cognitive 27) · ×1
  • Shim.updateAttributes (cognitive 27) src/bento/components/bento-mega-menu/1.0/component/Shim.tsx:47 — Shim.updateAttributes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 8). None of this is in the body itself: all 27 points belong to one function literal inside it that branches (line 52). 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.
D2 · Cognitive Complexity · component.BentoYoutubeWithRef (cognitive 27) · ×1
  • component.BentoYoutubeWithRef (cognitive 27) REDACTED:69 — component.BentoYoutubeWithRef has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 6, loops 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 12 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · getAmpAdMetadata (cognitive 27) · ×1
  • getAmpAdMetadata (cognitive 27) extensions/amp-a4a/0.1/amp-a4a.js:2244 — getAmpAdMetadata has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 6). Of this number, 23 points are the body's own statements and 4 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.
D2 · Cognitive Complexity · initialize (cognitive 27) · ×1
  • initialize (cognitive 27) src/service/url-replacements-impl.js:125 — initialize has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 11, if/else 8 (9 pts), ternaries 5, loops 1, other 1 (nesting depth added 1). None of this is in the body itself: all 27 points belong to 67 function items inside it that branch (a function literal at line 330, a function literal at line 185, a function literal at line 318, …). 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.
D2 · Cognitive Complexity · updateVisibilityState_ (cognitive 27) · ×1
  • updateVisibilityState_ (cognitive 27) src/service/ampdoc-impl.js:567 — updateVisibilityState_ has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 7, loops 1, other 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 27) · ×1
  • constructor (cognitive 27) REDACTED:21 — constructor has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 8, boolean chains 7, loops 2 (nesting depth added 1). Of this number, 15 points are the body's own statements and 12 belong to 20 function items inside it that branch. 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.
D2 · Cognitive Complexity · AmpAdExit.buildCallback (cognitive 26) · ×1
  • AmpAdExit.buildCallback (cognitive 26) REDACTED:332 — AmpAdExit.buildCallback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 9, loops 3 (4 pts), error handling 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.
D2 · Cognitive Complexity · AmpJWPlayer.onMessage_ (cognitive 24) · ×1
  • AmpJWPlayer.onMessage_ (cognitive 24) REDACTED:452 — AmpJWPlayer.onMessage_ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (4 pts), match/switch 2 (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.
D2 · Cognitive Complexity · sanitation.isValidAttr (cognitive 24) · ×1
  • sanitation.isValidAttr (cognitive 24) src/purifier/sanitation.js:363 — sanitation.isValidAttr has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, ternaries 3 (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.
D2 · Cognitive Complexity · render_ (cognitive 24) · ×1
  • render_ (cognitive 24) src/amp-story-player/amp-story-player-impl.js:1239 — render_ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 10). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 1276, 1267, 1286, …). 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.
D2 · Cognitive Complexity · setupElement_ (cognitive 24) · ×1
  • setupElement_ (cognitive 24) src/service/fixed-layer.js:652 — setupElement_ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 3, boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adoptShared (cognitive 24) · ×1
  • adoptShared (cognitive 24) src/runtime.js:71 — adoptShared has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), error handling 2 (5 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 5). Of this number, 16 points are the body's own statements and 8 belong to 9 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.
D2 · Cognitive Complexity · amp-ad-utils.getAmpAdMetadata (cognitive 23) · ×1
  • amp-ad-utils.getAmpAdMetadata (cognitive 23) extensions/amp-a4a/0.1/amp-ad-utils.js:45 — amp-ad-utils.getAmpAdMetadata has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 5). Of this number, 20 points are the body's own statements and 3 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.
D2 · Cognitive Complexity · _ping_._ping_ (cognitive 23) · ×1
  • _ping_._ping_ (cognitive 23) ads/vendors/_ping_.js:12 — _ping_._ping_ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · AmpConsent.enableExternalInteractions_ (cognitive 23) · ×1
  • AmpConsent.enableExternalInteractions_ (cognitive 23) extensions/amp-consent/0.1/amp-consent.js:300 — AmpConsent.enableExternalInteractions_ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 3, loops 1 (nesting depth added 9). None of this is in the body itself: all 23 points belong to one function literal inside it that branches (line 301). 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.
D2 · Cognitive Complexity · document-submit.onDocumentFormSubmit_ (cognitive 23) · ×1
  • document-submit.onDocumentFormSubmit_ (cognitive 23) src/document-submit.js:36 — document-submit.onDocumentFormSubmit_ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 6, loops 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, 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.
D2 · Cognitive Complexity · component.BentoImageSliderWithRef (cognitive 23) · ×1
  • component.BentoImageSliderWithRef (cognitive 23) extensions/amp-image-slider/1.0/component.js:64 — component.BentoImageSliderWithRef has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 433, 302, 254, …). 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.
D2 · Cognitive Complexity · AmpStory.switchTo_ (cognitive 23) · ×1
  • AmpStory.switchTo_ (cognitive 23) extensions/amp-story/1.0/amp-story.js:1435 — AmpStory.switchTo_ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1517, 1499, 1572). 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.
D2 · Cognitive Complexity · Values.calc_ (cognitive 23) · ×1
  • Values.calc_ (cognitive 23) src/core/context/values.js:556 — Values.calc_ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, ternaries 3 (5 pts) (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.
D2 · Cognitive Complexity · static-layout.applyStaticLayout (cognitive 23) · ×1
  • static-layout.applyStaticLayout (cognitive 23) src/core/static-layout.js:100 — static-layout.applyStaticLayout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · getBlockParameters_ (cognitive 23) · ×1
  • getBlockParameters_ (cognitive 23) REDACTED:689 — getBlockParameters_ has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 11, ternaries 9 (10 pts), if/else 2 (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.
D2 · Cognitive Complexity · calc (cognitive 23) · ×1
  • calc (cognitive 23) extensions/amp-animation/0.1/parsers/css-expr-ast.js:1279 — calc has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 1288, 1314, 1334). 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.
D2 · Cognitive Complexity · setup (cognitive 23) · ×1
  • setup (cognitive 23) testing/describes.js:699 — setup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 9 belong to 8 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.
D2 · Cognitive Complexity · pr-check.prCheck (cognitive 22) · ×1
  • pr-check.prCheck (cognitive 22) build-system/tasks/pr-check.js:25 — pr-check.prCheck has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21 (22 pts) (nesting depth added 1). Of this number, 21 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
D2 · Cognitive Complexity · AmpAnalytics.generateRequests_ (cognitive 22) · ×1
  • AmpAnalytics.generateRequests_ (cognitive 22) REDACTED:534 — AmpAnalytics.generateRequests_ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 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.
D2 · Cognitive Complexity · AmpImageSlider.buildCallback (cognitive 22) · ×1
  • AmpImageSlider.buildCallback (cognitive 22) extensions/amp-image-slider/0.1/amp-image-slider.js:100 — AmpImageSlider.buildCallback has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 1, loops 1 (nesting depth added 6). Of this number, 17 points are the body's own statements and 5 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.
D2 · Cognitive Complexity · AmpNextPage.buildCallback (cognitive 22) · ×1
  • AmpNextPage.buildCallback (cognitive 22) REDACTED:42 — AmpNextPage.buildCallback has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 4 (8 pts), boolean chains 7, if/else 7 (nesting depth added 4). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 61, 150). 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.
D2 · Cognitive Complexity · DraggableDrawer.onSwipeY_ (cognitive 22) · ×1
  • DraggableDrawer.onSwipeY_ (cognitive 22) extensions/amp-story-page-attachment/0.1/amp-story-draggable-drawer.js:427 — DraggableDrawer.onSwipeY_ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 6, ternaries 2 (6 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.
D2 · Cognitive Complexity · curve.getCurve (cognitive 22) · ×1
  • curve.getCurve (cognitive 22) src/core/data-structures/curve.js:265 — curve.getCurve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (5 pts) (nesting depth added 15). 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.
D2 · Cognitive Complexity · resource-container-helper.forAllWithinInternal (cognitive 22) · ×1
  • resource-container-helper.forAllWithinInternal (cognitive 22) src/core/dom/resource-container-helper.js:74 — resource-container-helper.forAllWithinInternal has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 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.
D2 · Cognitive Complexity · Purifier.validateAttributeChange (cognitive 22) · ×1
  • Purifier.validateAttributeChange (cognitive 22) src/purifier/index.js:152 — Purifier.validateAttributeChange has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 6, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Performance.registerPerformanceObserver_ (cognitive 22) · ×1
  • Performance.registerPerformanceObserver_ (cognitive 22) src/service/performance-impl.js:394 — Performance.registerPerformanceObserver_ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 5 (nesting depth added 1). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to one function item inside it that branches (processEntry). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · mergeRtcResponses_ (cognitive 22) · ×1
  • mergeRtcResponses_ (cognitive 22) REDACTED:911 — mergeRtcResponses_ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 919, 942, 949). 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.
D2 · Cognitive Complexity · (anonymous) (cognitive 22) · ×1
  • (anonymous) (cognitive 22) REDACTED:998 — (anonymous) has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3, other 3, error handling 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 1007, (anonymous)::writeChunk, a function literal at line 1111). 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.
D2 · Cognitive Complexity · googlePageParameters (cognitive 22) · ×1
  • googlePageParameters (cognitive 22) ads/google/a4a/utils.js:270 — googlePageParameters has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 12, boolean chains 8, error handling 2. Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 297, 277, 284). 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.
D2 · Cognitive Complexity · AmpAdXOriginIframeHandler.init (cognitive 21) · ×1
  • AmpAdXOriginIframeHandler.init (cognitive 21) extensions/amp-ad/0.1/amp-ad-xorigin-iframe-handler.js:101 — AmpAdXOriginIframeHandler.init has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 5, ternaries 1 (nesting depth added 1). Of this number, 12 points are the body's own statements and 9 belong to 5 function literals inside it that branch. 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.
D2 · Cognitive Complexity · check-json-schemas.checkJsonSchemas (cognitive 21) · ×1
  • check-json-schemas.checkJsonSchemas (cognitive 21) build-system/tasks/check-json-schemas.js:24 — check-json-schemas.checkJsonSchemas has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), error handling 1 (3 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.
D2 · Cognitive Complexity · js.getZindexJs (cognitive 21) · ×1
  • js.getZindexJs (cognitive 21) build-system/tasks/get-zindex/js.js:98 — js.getZindexJs has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (5 pts), boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 112). 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.
D2 · Cognitive Complexity · sra-utils.getTargetingAndExclusions (cognitive 21) · ×1
  • sra-utils.getTargetingAndExclusions (cognitive 21) extensions/amp-ad-network-doubleclick-impl/0.1/sra-utils.js:187 — sra-utils.getTargetingAndExclusions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 7, loops 1 (nesting depth added 4). Of this number, 12 points are the body's own statements and 9 belong to 3 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.
D2 · Cognitive Complexity · BindValidator.isResultValid (cognitive 21) · ×1
  • BindValidator.isResultValid (cognitive 21) REDACTED:91 — BindValidator.isResultValid has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, error handling 1 (3 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Bind.verifyBinding_ (cognitive 21) · ×1
  • Bind.verifyBinding_ (cognitive 21) extensions/amp-bind/0.1/bind-impl.js:1481 — Bind.verifyBinding_ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (2 pts), boolean chains 1, match/switch 1, ternaries 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.
D2 · Cognitive Complexity · sidebar-animations-hook.useSidebarAnimation (cognitive 21) · ×1
  • sidebar-animations-hook.useSidebarAnimation (cognitive 21) extensions/amp-sidebar/1.0/sidebar-animations-hook.js:45 — sidebar-animations-hook.useSidebarAnimation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (6 pts), boolean chains 3 (nesting depth added 7). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 60). 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.
D2 · Cognitive Complexity · findtext.findSentences (cognitive 21) · ×1
  • findtext.findSentences (cognitive 21) extensions/amp-viewer-integration/0.1/findtext.js:203 — findtext.findSentences has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 5 (7 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.
D2 · Cognitive Complexity · ActionService.addEvent (cognitive 21) · ×1
  • ActionService.addEvent (cognitive 21) src/service/action-impl.js:290 — ActionService.addEvent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4 (nesting depth added 7). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 300, 294). 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.
D2 · Cognitive Complexity · onCreativeRender (cognitive 21) · ×1
  • onCreativeRender (cognitive 21) REDACTED:1291 — onCreativeRender has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, ternaries 1 (nesting depth added 1). Of this number, 17 points are the body's own statements and 4 belong to 4 function literals inside it that branch. 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.
D2 · Cognitive Complexity · style-installer.insertStyleElement (cognitive 20) · ×1
  • style-installer.insertStyleElement (cognitive 20) src/style-installer.js:81 — style-installer.insertStyleElement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, ternaries 2 (3 pts) (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.
D2 · Cognitive Complexity · adunity.adunity (cognitive 20) · ×1
  • adunity.adunity (cognitive 20) ads/vendors/adunity.js:7 — adunity.adunity has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). Of this number, 18 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.
D2 · Cognitive Complexity · dable.dable (cognitive 20) · ×1
  • dable.dable (cognitive 20) ads/vendors/dable.js:7 — dable.dable has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 10. Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · netletix.netletix (cognitive 20) · ×1
  • netletix.netletix (cognitive 20) ads/vendors/netletix.js:21 — netletix.netletix has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (6 pts), match/switch 1 (2 pts) (nesting depth added 3). Of this number, 11 points are the body's own statements and 9 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · openx.openx (cognitive 20) · ×1
  • openx.openx (cognitive 20) ads/vendors/openx.js:29 — openx.openx has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3 (nesting depth added 7). Of this number, 14 points are the body's own statements and 6 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.
D2 · Cognitive Complexity · sas.sas (cognitive 20) · ×1
  • sas.sas (cognitive 20) ads/vendors/sas.js:11 — sas.sas has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (3 pts), boolean chains 2, error handling 1 (2 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.
D2 · Cognitive Complexity · ScrollAccessVendor.authorize (cognitive 20) · ×1
  • ScrollAccessVendor.authorize (cognitive 20) extensions/amp-access-scroll/0.1/scroll-impl.js:117 — ScrollAccessVendor.authorize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 5 (nesting depth added 8). None of this is in the body itself: all 20 points belong to 3 function literals inside it that branch (lines 119, 131, 136). 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.
D2 · Cognitive Complexity · AmpAdMetadataTransformer.generateHeadMetadata_ (cognitive 20) · ×1
  • AmpAdMetadataTransformer.generateHeadMetadata_ (cognitive 20) extensions/amp-ad-network-fake-impl/0.1/amp-ad-metadata-transformer.js:77 — AmpAdMetadataTransformer.generateHeadMetadata_ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · AmpAddThis.buildCallback (cognitive 20) · ×1
  • AmpAddThis.buildCallback (cognitive 20) extensions/amp-addthis/0.1/amp-addthis.js:129 — AmpAddThis.buildCallback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 8 (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.
D2 · Cognitive Complexity · config.mergeObjects (cognitive 20) · ×1
  • config.mergeObjects (cognitive 20) extensions/amp-analytics/0.1/config.js:480 — config.mergeObjects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · VisibilityModel.update_ (cognitive 20) · ×1
  • VisibilityModel.update_ (cognitive 20) extensions/amp-analytics/0.1/visibility-model.js:293 — VisibilityModel.update_ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3 (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.
D2 · Cognitive Complexity · VisibilityManager.createModelAndListen_ (cognitive 20) · ×1
  • VisibilityManager.createModelAndListen_ (cognitive 20) extensions/amp-analytics/0.1/visibility-manager.js:321 — VisibilityManager.createModelAndListen_ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · component.BentoIframe (cognitive 20) · ×1
  • component.BentoIframe (cognitive 20) extensions/amp-iframe/1.0/component.js:24 — component.BentoIframe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 4. None of this is in the body itself: all 20 points belong to 8 function items inside it that branch (a function literal at line 101, a function literal at line 57, a function literal at line 169, …). 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.
D2 · Cognitive Complexity · AmpStory.initializeListeners_ (cognitive 20) · ×1
  • AmpStory.initializeListeners_ (cognitive 20) extensions/amp-story/1.0/amp-story.js:657 — AmpStory.initializeListeners_ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 5, ternaries 1 (nesting depth added 1). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 850, 720, 838, …). 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.
D2 · Cognitive Complexity · mutateElement_ (cognitive 20) · ×1
  • mutateElement_ (cognitive 20) src/service/fixed-layer.js:785 — mutateElement_ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 9, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · constructor (cognitive 20) · ×1
  • constructor (cognitive 20) src/service/history-impl.js:372 — constructor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, error handling 3 (5 pts) (nesting depth added 5). Of this number, 12 points are the body's own statements and 8 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.
D2 · Cognitive Complexity · prefer-deferred-promise.default.NewExpression (cognitive 19) · ×1
  • prefer-deferred-promise.default.NewExpression (cognitive 19) build-system/eslint-rules/prefer-deferred-promise.js:57 — prefer-deferred-promise.default.NewExpression has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · restrict-this-access.default (cognitive 19) · ×1
  • restrict-this-access.default (cognitive 19) build-system/eslint-rules/restrict-this-access.js:6 — restrict-this-access.default has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, ternaries 2 (3 pts), boolean chains 1 (nesting depth added 1). Of this number, 13 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · AmpAutocomplete.keyDownHandler_ (cognitive 19) · ×1
  • AmpAutocomplete.keyDownHandler_ (cognitive 19) REDACTED:1294 — AmpAutocomplete.keyDownHandler_ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, match/switch 1 (nesting depth added 8). Of this number, 17 points are the body's own statements and 2 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.
D2 · Cognitive Complexity · AmpSlideScroll.moveSlide (cognitive 19) · ×1
  • AmpSlideScroll.moveSlide (cognitive 19) extensions/amp-carousel/0.1/slidescroll.js:534 — AmpSlideScroll.moveSlide has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · date-picker-common.withDatePickerCommon (cognitive 19) · ×1
  • date-picker-common.withDatePickerCommon (cognitive 19) extensions/amp-date-picker/0.1/date-picker-common.js:11 — date-picker-common.withDatePickerCommon has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 3 (4 pts) (nesting depth added 1). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to 8 function items inside it that branch (isOutsideRange, getDefaultMinDate, isDayBlocked, …). 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.
D2 · Cognitive Complexity · form-proxy.createFormProxyConstr (cognitive 19) · ×1
  • form-proxy.createFormProxyConstr (cognitive 19) extensions/amp-form/0.1/form-proxy.js:59 — form-proxy.createFormProxyConstr has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (nesting depth added 7). None of this is in the body itself: all 19 points belong to 2 function literals inside it that branch (lines 90, 77). 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.
D2 · Cognitive Complexity · AmpSlikeplayer.onMessage_ (cognitive 19) · ×1
  • AmpSlikeplayer.onMessage_ (cognitive 19) extensions/amp-slikeplayer/0.1/amp-slikeplayer.js:307 — AmpSlikeplayer.onMessage_ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, match/switch 1 (2 pts) (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.
D2 · Cognitive Complexity · ViewerSubscriptionPlatform.verifyAuthToken_ (cognitive 19) · ×1
  • ViewerSubscriptionPlatform.verifyAuthToken_ (cognitive 19) extensions/amp-subscriptions/0.1/viewer-subscription-platform.js:140 — ViewerSubscriptionPlatform.verifyAuthToken_ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 7). None of this is in the body itself: all 19 points belong to one function literal inside it that branches (line 141). 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.
D2 · Cognitive Complexity · component.VideoWrapperWithRef (cognitive 19) · ×1
  • component.VideoWrapperWithRef (cognitive 19) src/bento/components/bento-video/1.0/component.js:68 — component.VideoWrapperWithRef has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 5 of the 19 points are its own statements and the rest belongs to 9 function literals inside it that branch (lines 112, 166, 175, …). 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.
D2 · Cognitive Complexity · Purifier.addPurifyHooks_ · ×1
  • Purifier.addPurifyHooks_::uponSanitizeAttribute (cognitive 19) src/purifier/index.js:275 — Purifier.addPurifyHooks_::uponSanitizeAttribute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · layoutCallback (cognitive 19) · ×1
  • layoutCallback (cognitive 19) extensions/amp-script/0.1/amp-script.js:248 — layoutCallback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (8 pts), ternaries 3 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 4). Of this number, 12 points are the body's own statements and 7 belong to 8 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.
D2 · Cognitive Complexity · exit (cognitive 19) · ×1
  • exit (cognitive 19) REDACTED:103 — exit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 5). Of this number, 16 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · url.parseUrlWithA (cognitive 18) · ×1
  • url.parseUrlWithA (cognitive 18) REDACTED:106 — url.parseUrlWithA has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9, boolean chains 7, ternaries 2. 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.
D2 · Cognitive Complexity · core-dom-jsx.default.isValidStyleOrClassValue (cognitive 18) · ×1
  • core-dom-jsx.default.isValidStyleOrClassValue (cognitive 18) build-system/eslint-rules/core-dom-jsx.js:14 — core-dom-jsx.default.isValidStyleOrClassValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 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.
D2 · Cognitive Complexity · make-release._createComponentSections (cognitive 18) · ×1
  • make-release._createComponentSections (cognitive 18) build-system/release-tagger/make-release.js:45 — make-release._createComponentSections has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 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.
D2 · Cognitive Complexity · app.app.get() (cognitive 18) · ×1
  • app.app.get() (cognitive 18) REDACTED:998 — app.app.get() has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (nesting depth added 2). None of this is in the body itself: all 18 points belong to 2 function literals inside it that branch (lines 1007, 1093). 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.
D2 · Cognitive Complexity · VisibilityObserver.getRelativePosFromSentinel (cognitive 18) · ×1
  • VisibilityObserver.getRelativePosFromSentinel (cognitive 18) extensions/amp-next-page/1.0/visibility-observer.js:329 — VisibilityObserver.getRelativePosFromSentinel has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 4, ternaries 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · scroller.ScrollerWithRef (cognitive 18) · ×1
  • scroller.ScrollerWithRef (cognitive 18) src/bento/components/bento-base-carousel/1.0/scroller.js:43 — scroller.ScrollerWithRef has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 3, ternaries 3. Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 8 function items inside it that branch (a function literal at line 165, a function literal at line 177, a function literal at line 80, …). 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.
D2 · Cognitive Complexity · ActionService.invoke_ (cognitive 18) · ×1
  • ActionService.invoke_ (cognitive 18) src/service/action-impl.js:671 — ActionService.invoke_ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · document-info-impl.getLinkRels (cognitive 18) · ×1
  • document-info-impl.getLinkRels (cognitive 18) src/service/document-info-impl.js:121 — document-info-impl.getLinkRels has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 133). 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.
D2 · Cognitive Complexity · buildCallback (cognitive 18) · ×1
  • buildCallback (cognitive 18) extensions/amp-story/1.0/amp-story.js:352 — buildCallback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 4, ternaries 1 (nesting depth added 1). Of this number, 16 points are the body's own statements and 2 belong to 5 function literals inside it that branch. 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.
D2 · Cognitive Complexity · add (cognitive 18) · ×1
  • add (cognitive 18) extensions/amp-analytics/0.1/events.js:1574 — add has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, loops 2, ternaries 1 (2 pts) (nesting depth added 2). Of this number, 16 points are the body's own statements and 2 belong to 3 function literals 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.
D2 · Cognitive Complexity · constructor (cognitive 18) · ×1
  • constructor (cognitive 18) extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js:103 — constructor has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 3, ternaries 2, match/switch 1. Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to 11 function literals inside it that branch (lines 198, 228, 143, …). 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.
D2 · Cognitive Complexity · validateRtcConfig_ (cognitive 18) · ×1
  • validateRtcConfig_ (cognitive 18) src/service/real-time-config/real-time-config-impl.js:634 — validateRtcConfig_ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, error handling 1, match/switch 1, ternaries 1 (nesting depth added 1). Of this number, 10 points are the body's own statements and 8 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · yotpo.yotpo (cognitive 17) · ×1
  • yotpo.yotpo (cognitive 17) 3p/yotpo.js:258 — yotpo.yotpo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 1 (nesting depth added 1). Of this number, 11 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · url-builder.buildUrl (cognitive 17) · ×1
  • url-builder.buildUrl (cognitive 17) ads/google/a4a/shared/url-builder.js:15 — url-builder.buildUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.getMultiSizeDimensions (cognitive 17) · ×1
  • utils.getMultiSizeDimensions (cognitive 17) ads/google/utils.js:41 — utils.getMultiSizeDimensions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, 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.
D2 · Cognitive Complexity · affinity.affinity (cognitive 17) · ×1
  • affinity.affinity (cognitive 17) ads/vendors/affinity.js:7 — affinity.affinity has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 4 (6 pts), boolean chains 3 (nesting depth added 3). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 5 function items inside it that branch (chkIsvalidContext, jsonParse, getAmpContext, …). 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.
D2 · Cognitive Complexity · clickio.clickio (cognitive 17) · ×1
  • clickio.clickio (cognitive 17) ads/vendors/clickio.js:14 — clickio.clickio has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6 (nesting depth added 6). 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.
D2 · Cognitive Complexity · ssp.ssp (cognitive 17) · ×1
  • ssp.ssp (cognitive 17) ads/vendors/ssp.js:119 — ssp.ssp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, ternaries 2 (3 pts), error handling 1 (nesting depth added 3). Most of this is not in the body itself: 4 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 202, 160, 183). 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.
D2 · Cognitive Complexity · videonow.videonow (cognitive 17) · ×1
  • videonow.videonow (cognitive 17) ads/vendors/videonow.js:10 — videonow.videonow has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (5 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · checks.prBuildWorkflow (cognitive 17) · ×1
  • checks.prBuildWorkflow (cognitive 17) build-system/pr-check/checks.js:43 — checks.prBuildWorkflow has cognitive complexity 17 (threshold 15). Drivers by points: if/else 17. 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.
D2 · Cognitive Complexity · dep-check.Rule.matchBadDeps (cognitive 17) · ×1
  • dep-check.Rule.matchBadDeps (cognitive 17) build-system/tasks/dep-check.js:99 — dep-check.Rule.matchBadDeps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 115). 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.
D2 · Cognitive Complexity · index.collectWork (cognitive 17) · ×1
  • index.collectWork (cognitive 17) build-system/tasks/sweep-experiments/index.js:359 — index.collectWork has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index.runVisualTests (cognitive 17) · ×1
  • index.runVisualTests (cognitive 17) REDACTED:253 — index.runVisualTests has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 1 (3 pts), loops 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · ExternalReorderHeadTransformer.registerScript_ (cognitive 17) · ×1
  • ExternalReorderHeadTransformer.registerScript_ (cognitive 17) extensions/amp-ad-network-fake-impl/0.1/external-reorder-head-transformer.js:130 — ExternalReorderHeadTransformer.registerScript_ has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · amp-ad-network-valueimpression-impl.buildUrl (cognitive 17) · ×1
  • amp-ad-network-valueimpression-impl.buildUrl (cognitive 17) extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:513 — amp-ad-network-valueimpression-impl.buildUrl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BaseCustomElement.upgradeOrSchedule_ (cognitive 17) · ×1
  • BaseCustomElement.upgradeOrSchedule_ (cognitive 17) src/custom-element.js:1248 — BaseCustomElement.upgradeOrSchedule_ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 7). Of this number, 13 points are the body's own statements and 4 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.
D2 · Cognitive Complexity · VisibilityManagerForDoc.constructor (cognitive 17) · ×1
  • VisibilityManagerForDoc.constructor (cognitive 17) extensions/amp-analytics/0.1/visibility-manager.js:560 — VisibilityManagerForDoc.constructor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 6). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 2 function items inside it that branch (resizeListener, a function literal at line 624). 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.
D2 · Cognitive Complexity · css-expr-ast.createPositionNode (cognitive 17) · ×1
  • css-expr-ast.createPositionNode (cognitive 17) extensions/amp-animation/0.1/parsers/css-expr-ast.js:690 — css-expr-ast.createPositionNode has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 4, boolean chains 3, loops 1 (2 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.
D2 · Cognitive Complexity · AmpForm.maybeInitializeFromUrl_ · ×1
  • AmpForm.maybeInitializeFromUrl_::maybeFillField (cognitive 17) extensions/amp-form/0.1/amp-form.js:1356 — AmpForm.maybeInitializeFromUrl_::maybeFillField has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 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.
D2 · Cognitive Complexity · AmpGeo.addToHtmlAndBody_ (cognitive 17) · ×1
  • AmpGeo.addToHtmlAndBody_ (cognitive 17) extensions/amp-geo/0.1/amp-geo.js:502 — AmpGeo.addToHtmlAndBody_ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 8). None of this is in the body itself: all 17 points belong to 4 function literals inside it that branch (lines 515, 555, 560, …). 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.
D2 · Cognitive Complexity · AmpIframely.handleEvent_ (cognitive 17) · ×1
  • AmpIframely.handleEvent_ (cognitive 17) extensions/amp-iframely/0.1/amp-iframely.js:153 — AmpIframely.handleEvent_ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3 (nesting depth added 6). Of this number, 9 points are the body's own statements and 8 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.
D2 · Cognitive Complexity · AmpList.updateBindings_ (cognitive 17) · ×1
  • AmpList.updateBindings_ (cognitive 17) extensions/amp-list/0.1/amp-list.js:1017 — AmpList.updateBindings_ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 2 (nesting depth added 3). Of this number, 13 points are the body's own statements and 4 belong to 3 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.
D2 · Cognitive Complexity · AmpStoryPlayer.onSwipeX_ (cognitive 17) · ×1
  • AmpStoryPlayer.onSwipeX_ (cognitive 17) src/amp-story-player/amp-story-player-impl.js:1879 — AmpStoryPlayer.onSwipeX_ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 2 (6 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · index.deepMerge (cognitive 17) · ×1
  • index.deepMerge (cognitive 17) src/core/types/object/index.js:70 — index.deepMerge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 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.
D2 · Cognitive Complexity · AnimationPlayer.complete_ (cognitive 17) · ×1
  • AnimationPlayer.complete_ (cognitive 17) src/utils/animation.js:241 — AnimationPlayer.complete_ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (6 pts), error handling 1 (2 pts) (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.
D2 · Cognitive Complexity · advance (cognitive 17) · ×1
  • advance (cognitive 17) extensions/amp-base-carousel/0.1/carousel.js:382 — advance has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 6, ternaries 2 (3 pts) (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.
D2 · Cognitive Complexity · measure (cognitive 17) · ×1
  • measure (cognitive 17) src/service/resource.js:421 — measure 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.
D2 · Cognitive Complexity · environment.maybeInstrumentsNodes (cognitive 16) · ×1
  • environment.maybeInstrumentsNodes (cognitive 16) 3p/environment.js:98 — environment.maybeInstrumentsNodes has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), error handling 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). Of this number, 12 points are the body's own statements and 4 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.
D2 · Cognitive Complexity · revcontent.revcontent (cognitive 16) · ×1
  • revcontent.revcontent (cognitive 16) ads/vendors/revcontent.js:175 — revcontent.revcontent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 209, 239, 198). 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.
D2 · Cognitive Complexity · prettify.runPrettify (cognitive 16) · ×1
  • prettify.runPrettify (cognitive 16) build-system/tasks/prettify.js:110 — prettify.runPrettify has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (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.
D2 · Cognitive Complexity · SanitizerImpl.setAttribute (cognitive 16) · ×1
  • SanitizerImpl.setAttribute (cognitive 16) extensions/amp-script/0.1/amp-script.js:788 — SanitizerImpl.setAttribute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1 (nesting depth added 8). 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.
D2 · Cognitive Complexity · single-date-picker.SingleDatePickerWithRef (cognitive 16) · ×1
  • single-date-picker.SingleDatePickerWithRef (cognitive 16) extensions/amp-date-picker/1.0/component/single-date-picker.tsx:27 — single-date-picker.SingleDatePickerWithRef has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 8 function literals inside it that branch (lines 71, 87, 126, …). 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.
D2 · Cognitive Complexity · Gestures.doPass_ (cognitive 16) · ×1
  • Gestures.doPass_ (cognitive 16) src/gesture.js:465 — Gestures.doPass_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · component.BentoSelectorOption (cognitive 16) · ×1
  • component.BentoSelectorOption (cognitive 16) extensions/amp-selector/1.0/component.js:275 — component.BentoSelectorOption has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 7, ternaries 1. Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 310, 322, 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.
D2 · Cognitive Complexity · AmpSlikeplayer.buildCallback (cognitive 16) · ×1
  • AmpSlikeplayer.buildCallback (cognitive 16) extensions/amp-slikeplayer/0.1/amp-slikeplayer.js:115 — AmpSlikeplayer.buildCallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 7). 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.
D2 · Cognitive Complexity · AmpVideoIframe.onMessage_ (cognitive 16) · ×1
  • AmpVideoIframe.onMessage_ (cognitive 16) REDACTED:271 — AmpVideoIframe.onMessage_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 2, match/switch 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.
D2 · Cognitive Complexity · ContextNode.closest (cognitive 16) · ×1
  • ContextNode.closest (cognitive 16) src/core/context/node.js:88 — ContextNode.closest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · Bezier.solvePositionFromXValue_ (cognitive 16) · ×1
  • Bezier.solvePositionFromXValue_ (cognitive 16) src/core/data-structures/curve.js:69 — Bezier.solvePositionFromXValue_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · form.getFormAsObject (cognitive 16) · ×1
  • form.getFormAsObject (cognitive 16) src/core/dom/form.js:29 — form.getFormAsObject has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, loops 1 (nesting depth added 6). Of this number, 12 points are the body's own statements and 4 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.
D2 · Cognitive Complexity · Navigation.handleNavigation_ (cognitive 16) · ×1
  • Navigation.handleNavigation_ (cognitive 16) src/service/navigation.js:508 — Navigation.handleNavigation_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5 (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.
D2 · Cognitive Complexity · OwnersImpl.discoverResourcesForElement_ (cognitive 16) · ×1
  • OwnersImpl.discoverResourcesForElement_ (cognitive 16) src/service/owners-impl.js:115 — OwnersImpl.discoverResourcesForElement_ 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.
D2 · Cognitive Complexity · build.CheckPrereqs (cognitive 16) · ×1
  • build.CheckPrereqs (cognitive 16) REDACTED:42 — build.CheckPrereqs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (4 pts), boolean chains 2, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · adjustSlotPostExpansion_ (cognitive 16) · ×1
  • adjustSlotPostExpansion_ (cognitive 16) REDACTED:1554 — adjustSlotPostExpansion_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · applyUpdatesToElement_ (cognitive 16) · ×1
  • applyUpdatesToElement_ (cognitive 16) extensions/amp-bind/0.1/bind-impl.js:1219 — applyUpdatesToElement_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 2 (6 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1227, 1223). 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.
D2 · Cognitive Complexity · work_ (cognitive 16) · ×1
  • work_ (cognitive 16) src/service/resources-impl.js:1291 — work_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 1 (4 pts), boolean chains 1, 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.
D2 · Cognitive Complexity · getNextSlideIndex_ (cognitive 16) · ×1
  • getNextSlideIndex_ (cognitive 16) extensions/amp-carousel/0.1/slidescroll.js:663 — getNextSlideIndex_ has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 6, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · updateAction_ (cognitive 16) · ×1
  • updateAction_ (cognitive 16) extensions/amp-live-list/0.1/amp-live-list.js:314 — updateAction_ has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 6, if/else 6, ternaries 2 (4 pts) (nesting depth added 2). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 321, 383, 327, …). 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.
D2 · Cognitive Complexity · handleReady_ (cognitive 16) · ×1
  • handleReady_ (cognitive 16) REDACTED:389 — handleReady_ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 4, ternaries 1 (3 pts) (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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling · ×1
  • Change coupling: check-sourcemaps.js ↔ helpers.js build-system/tasks/check-sourcemaps.js:1 — `build-system/tasks/check-sourcemaps.js` and `build-system/tasks/helpers.js` change together 53% of the time (8 of the 15 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 8 shared commits counted here, the most recent 3 are `3dcace4c` 🏗 Partial updates for core devDependencies (#39768); `4039136a` 🏗️ Fix the `sources` of extension sourcemaps (#37829); `fdb1fec6` 🐛 Make prepending AMP_CONFIG sourcemap aware (#37640) — run `git show` on any of them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) REDACTED:104 — REDACTED:104-116 | validator/js/webui/build.py:62-74 — 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.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) REDACTED:35 — REDACTED:35-68 | REDACTED:122-155 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:158` calls `Error` and `REDACTED:69` 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.
D5 · Coupling · Unstable project //cpp/engine · ×1
  • Unstable project //cpp/engine:validator-internal — //cpp/engine:validator-internal has instability 0.94 with 1 dependents.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — validator/js/gulpjs/ runs mocha but declares no coverage provider, so the suite can run and still produce no lcov — add `c8` (or `nyc`) as a devDependency so the suite can be wrapped for coverage. 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.
IC1 · Incompleteness & stubs · Skeleton type · ×1
  • Skeleton type — most members are unfinished extensions/amp-story-auto-ads/0.1/algorithm-interface.js:5 — `StoryAdPlacementAlgorithm` has 4 unfinished members out of 4 declared members (methods and accessors, whether or not each carries a body) — a scaffolded class that was never implemented.
IC1 · Incompleteness & stubs · Both branches are identical · ×1
  • Both branches are identical — the condition decides nothing src/friendly-iframe-embed.js:737 — The `if` and its `else` contain the same statements, so no input can make the condition matter. Implement the distinction that was intended, or drop the branch and keep the body.
P4 · Deployment & Rollback · No deployment automation · ×1
  • No deployment automation — No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
R10 · Code Duplication · Duplication concentrated across 125 sibling directories (265 clone groups) · ×1
  • Duplication concentrated across 125 sibling directories (265 clone groups) extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:300 — 265 duplicated blocks under extensions/ have copies in at least two of the sibling directories amp-3d-gltf, amp-3q-player, amp-a4a, amp-access, amp-access-fewcents, amp-access-laterpay (+119 more sibling(s) not listed) — 170 of them are reported below, and 95 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 265 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 265 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 265 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 6 sibling directories (53 clone groups) · ×1
  • Duplication concentrated across 6 sibling directories (53 clone groups) extensions/amp-accordion/1.0/storybook/Basic.js:6 — 53 duplicated blocks under the repository root have copies in at least two of the sibling directories 3p, ads, build-system, extensions, src, testing — 32 of them are reported below, and 21 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 53 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 53 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 53 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (10 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (10 clone groups) src/core/assert/dev.js:17 — 10 duplicated blocks under src/ have copies in at least two of the sibling directories core, inabox, polyfills, preact, service, utils (+1 more sibling(s) not listed) — 8 of them are reported below, and 2 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 10 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 10 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 10 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (5 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (5 clone groups) build-system/pr-check/checks.js:46 — 5 duplicated blocks under build-system/ have copies in at least two of the sibling directories babel-plugins, compile, eslint-rules, pr-check, release-workflows, task-runner (+1 more sibling(s) not listed) — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Wholesale file copy (313 identical lines × 2 files) · ×1
  • Wholesale file copy (313 identical lines × 2 files) extensions/amp-sidebar/0.1/amp-sidebar.js:1 — extensions/amp-sidebar/0.1/amp-sidebar.js:1 · extensions/amp-sidebar/0.2/amp-sidebar.js:1 — these 2 files are line-for-line copies of one another — 313 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 · Wholesale file copy (256 identical lines × 2 files) · ×1
  • Wholesale file copy (256 identical lines × 2 files) extensions/amp-access-laterpay/0.1/laterpay-impl.js:1 — extensions/amp-access-laterpay/0.1/laterpay-impl.js:1 · extensions/amp-access-laterpay/0.2/laterpay-impl.js:1 — these 2 files are line-for-line copies of one another — 256 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 (228 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (228 matched lines × 2 locations) extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:300 — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:300 · extensions/amp-image-viewer/0.1/amp-image-viewer.js:375 — the two spans are one implementation copied and then locally edited — 1405 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 · Wholesale file copy (139 identical lines × 2 files) · ×1
  • Wholesale file copy (139 identical lines × 2 files) extensions/amp-story-auto-ads/0.1/_locales/index.js:1 — extensions/amp-story-auto-ads/0.1/_locales/index.js:1 · extensions/amp-story/1.0/_locales/index.js:1 — these 2 files are line-for-line copies of one another — 139 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 (132 lines × 2 locations) · ×1
  • Duplicated block (132 lines × 2 locations) extensions/amp-twitter/0.1/storybook/Basic.amp.js:31 — extensions/amp-twitter/0.1/storybook/Basic.amp.js:31 · extensions/amp-twitter/1.0/storybook/Basic.amp.js:32 — 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 · Wholesale file copy (122 identical lines × 2 files) · ×1
  • Wholesale file copy (122 identical lines × 2 files) extensions/amp-sidebar/0.1/swipe-to-dismiss.js:1 — extensions/amp-sidebar/0.1/swipe-to-dismiss.js:1 · extensions/amp-sidebar/0.2/swipe-to-dismiss.js:1 — these 2 files are line-for-line copies of one another — 122 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 (118 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (118 matched lines × 2 locations) extensions/amp-brightcove/0.1/amp-brightcove.js:276 — extensions/amp-brightcove/0.1/amp-brightcove.js:276 · extensions/amp-powr-player/0.1/amp-powr-player.js:197 — the two spans are one implementation copied and then locally edited — 524 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 (110 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (110 matched lines × 2 locations) src/service/viewport/viewport-binding-ios-embed-wrapper.js:18 — src/service/viewport/viewport-binding-ios-embed-wrapper.js:18 · src/service/viewport/viewport-binding-natural.js:14 — the two spans are one implementation copied and then locally edited — 548 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 (96 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (96 matched lines × 2 locations) extensions/amp-viewer-integration/0.1/viewer-initiated-handshake-viewer-for-testing.js:3 — extensions/amp-viewer-integration/0.1/viewer-initiated-handshake-viewer-for-testing.js:3 · REDACTED:5 — the two spans are one implementation copied and then locally edited — 545 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 (95 lines × 8 locations) · ×1
  • Duplicated block (95 lines × 8 locations) extensions/amp-lightbox/1.0/storybook/Basic.amp.js:103 — extensions/amp-lightbox/1.0/storybook/Basic.amp.js:103 · extensions/amp-lightbox/1.0/storybook/Basic.amp.js:238 · extensions/amp-lightbox/1.0/storybook/Basic.js:66 · extensions/amp-lightbox/1.0/storybook/Basic.js:213 · +4 more site(s) not listed — the 8 copies are spread across 4 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — 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.
R10 · Code Duplication · Duplicated block with local edits (91 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (91 matched lines × 2 locations) src/gesture-recognizers.js:138 — src/gesture-recognizers.js:138 · src/gesture-recognizers.js:523 — the two spans are one implementation copied and then locally edited — 501 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 (90 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (90 matched lines × 2 locations) extensions/amp-access/0.1/amp-access-server-jwt.js:30 — extensions/amp-access/0.1/amp-access-server-jwt.js:30 · extensions/amp-access/0.1/amp-access-server.js:16 — the two spans are one implementation copied and then locally edited — 535 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 · Wholesale file copy (81 identical lines × 2 files) · ×1
  • Wholesale file copy (81 identical lines × 2 files) extensions/amp-analytics/0.1/linker.js:4 — extensions/amp-analytics/0.1/linker.js:4 · extensions/amp-consent/0.1/linker.js:4 — these 2 files are line-for-line copies of one another — 81 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) extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:99 — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:99 · extensions/amp-image-viewer/0.1/amp-image-viewer.js:78 — the two spans are one implementation copied and then locally edited — 441 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 (78 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (78 matched lines × 2 locations) extensions/amp-brightcove/0.1/amp-brightcove.js:80 — extensions/amp-brightcove/0.1/amp-brightcove.js:80 · extensions/amp-powr-player/0.1/amp-powr-player.js:60 — the two spans are one implementation copied and then locally edited — 404 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 (74 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (74 matched lines × 2 locations) REDACTED:37 — REDACTED:37 · REDACTED:42 — the two spans are one implementation copied and then locally edited — 366 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 (72 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (72 matched lines × 2 locations) extensions/amp-a4a/0.1/amp-a4a.js:2244 — extensions/amp-a4a/0.1/amp-a4a.js:2244 · extensions/amp-a4a/0.1/amp-ad-utils.js:45 — the two spans are one implementation copied and then locally edited — 394 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 · Wholesale file copy (72 identical lines × 2 files) · ×1
  • Wholesale file copy (72 identical lines × 2 files) extensions/amp-accordion/1.0/storybook/Basic.js:6 — extensions/amp-accordion/1.0/storybook/Basic.js:6 · src/bento/components/bento-accordion/1.0/storybook/Basic.js:6 — these 2 files are line-for-line copies of one another — 72 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 (71 lines × 2 locations) · ×1
  • Duplicated block (71 lines × 2 locations) REDACTED:192 — REDACTED:192 · REDACTED:189 — 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 (69 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (69 matched lines × 2 locations) extensions/amp-analytics/0.1/cookie-writer.js:88 — extensions/amp-analytics/0.1/cookie-writer.js:88 · extensions/amp-consent/0.1/cookie-writer.js:81 — the two spans are one implementation copied and then locally edited — 374 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 · Wholesale file copy (62 identical lines × 2 files) · ×1
  • Wholesale file copy (62 identical lines × 2 files) extensions/amp-ad-network-doubleclick-impl/0.1/flexible-ad-slot-utils.js:1 — extensions/amp-ad-network-doubleclick-impl/0.1/flexible-ad-slot-utils.js:1 · extensions/amp-ad-network-valueimpression-impl/0.1/flexible-ad-slot-utils.js:1 — these 2 files are line-for-line copies of one another — 62 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 · Wholesale file copy (59 identical lines × 2 files) · ×1
  • Wholesale file copy (59 identical lines × 2 files) extensions/amp-sidebar/0.1/toolbar.js:1 — extensions/amp-sidebar/0.1/toolbar.js:1 · extensions/amp-sidebar/0.2/toolbar.js:1 — these 2 files are line-for-line copies of one another — 59 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 (57 lines × 2 locations) · ×1
  • Duplicated block (57 lines × 2 locations) REDACTED:248 — REDACTED:248 · REDACTED:218 — 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 (57 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (57 matched lines × 2 locations) src/core/assert/dev.js:40 — src/core/assert/dev.js:40 · src/core/assert/user.js:28 — the two spans are one implementation copied and then locally edited — 99 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row'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 · Wholesale file copy (56 identical lines × 3 files) · ×1
  • Wholesale file copy (56 identical lines × 3 files) extensions/amp-facebook-comments/0.1/amp-facebook-comments.js:1 — extensions/amp-facebook-comments/0.1/amp-facebook-comments.js:1 · extensions/amp-facebook-like/0.1/amp-facebook-like.js:1 · extensions/amp-facebook-page/0.1/amp-facebook-page.js:1 — these 3 files are line-for-line copies of one another — 56 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 · Wholesale file copy (52 identical lines × 2 files) · ×1
  • Wholesale file copy (52 identical lines × 2 files) extensions/amp-accordion/1.0/storybook/Basic.amp.js:1 — extensions/amp-accordion/1.0/storybook/Basic.amp.js:1 · src/bento/components/bento-accordion/1.0/storybook/Basic.amp.js:1 — these 2 files are line-for-line copies of one another — 52 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 (49 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (49 matched lines × 2 locations) extensions/amp-experiment/0.1/amp-experiment.js:11 — extensions/amp-experiment/0.1/amp-experiment.js:11 · extensions/amp-experiment/1.0/amp-experiment.js:19 — the two spans are one implementation copied and then locally edited — 258 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 (46 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (46 matched lines × 2 locations) extensions/amp-lightbox-gallery/1.0/amp-lightbox-gallery.js:25 — extensions/amp-lightbox-gallery/1.0/amp-lightbox-gallery.js:25 · extensions/amp-lightbox/1.0/amp-lightbox.js:21 — the two spans are one implementation copied and then locally edited — 261 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 (44 lines × 3 locations) · ×1
  • Duplicated block (44 lines × 3 locations) ads/vendors/adskeeper.js:23 — ads/vendors/adskeeper.js:23 · ads/vendors/idealmedia.js:7 · ads/vendors/mgid.js:7 — 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 (44 lines × 2 locations) · ×1
  • Duplicated block (44 lines × 2 locations) extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.js:86 — extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.js:86 · extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.js:140 — 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.
R10 · Code Duplication · Duplicated block (43 lines × 3 locations) · ×1
  • Duplicated block (43 lines × 3 locations) REDACTED:258 — REDACTED:258 · REDACTED:278 · REDACTED:244 — 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.
R2 · Cyclomatic Complexity · Complex function discoverWork_ (cyclomatic 66, cognitive 84) · ×1
  • Complex function discoverWork_ (cyclomatic 66, cognitive 84) src/service/resources-impl.js:1048 — discoverWork_ has cyclomatic complexity 66 and cognitive complexity 84; 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.
R2 · Cyclomatic Complexity · Complex function eval_ (cyclomatic 59, cognitive 60) · ×1
  • Complex function eval_ (cyclomatic 59, cognitive 60) extensions/amp-bind/0.1/bind-expression.js:325 — eval_ has cyclomatic complexity 59 and cognitive complexity 60; 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.
R2 · Cyclomatic Complexity · Complex function getErrorReportData (cyclomatic 46, cognitive 51) · ×1
  • Complex function getErrorReportData (cyclomatic 46, cognitive 51) src/error-reporting.js:490 — getErrorReportData has cyclomatic complexity 46 and cognitive complexity 51; 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.
R2 · Cyclomatic Complexity · Complex function mutateWork_ (cyclomatic 43, cognitive 80) · ×1
  • Complex function mutateWork_ (cyclomatic 43, cognitive 80) src/service/resources-impl.js:712 — mutateWork_ has cyclomatic complexity 43 and cognitive complexity 80; 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.
R2 · Cyclomatic Complexity · Complex function getEffectiveLayoutInternal (cyclomatic 38, cognitive 36) · ×1
  • Complex function getEffectiveLayoutInternal (cyclomatic 38, cognitive 36) src/core/static-layout.js:238 — getEffectiveLayoutInternal has cyclomatic complexity 38 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 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.
R2 · Cyclomatic Complexity · Complex function startTag (cyclomatic 36, cognitive 69) · ×1
  • Complex function startTag (cyclomatic 36, cognitive 69) src/sanitizer.js:88 — startTag has cyclomatic complexity 36 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 34, cognitive 37) · ×1
  • Complex function (anonymous) (cyclomatic 34, cognitive 37) extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:244 — (anonymous) has cyclomatic complexity 34 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.
R2 · Cyclomatic Complexity · Complex function onMessage_ (cyclomatic 34, cognitive 19) · ×1
  • Complex function onMessage_ (cyclomatic 34, cognitive 19) extensions/amp-slikeplayer/0.1/amp-slikeplayer.js:307 — onMessage_ has cyclomatic complexity 34 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.
R2 · Cyclomatic Complexity · Complex function next_ (cyclomatic 32, cognitive 52) · ×1
  • Complex function next_ (cyclomatic 32, cognitive 52) src/service/action-impl.js:1276 — next_ has cyclomatic complexity 32 and cognitive complexity 52; 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.
R2 · Cyclomatic Complexity · Complex function getAdUrl (cyclomatic 32, cognitive 31) · ×1
  • Complex function getAdUrl (cyclomatic 32, cognitive 31) extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:279 — getAdUrl has cyclomatic complexity 32 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 31, cognitive 44) · ×1
  • Complex function (anonymous) (cyclomatic 31, cognitive 44) src/core/dom/media-query-props.js:131 — (anonymous) has cyclomatic complexity 31 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.
R2 · Cyclomatic Complexity · Complex function onMessage (cyclomatic 30, cognitive 29) · ×1
  • Complex function onMessage (cyclomatic 30, cognitive 29) REDACTED:1375 — onMessage has cyclomatic complexity 30 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 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.
R2 · Cyclomatic Complexity · Complex function mergeShadowHead_ (cyclomatic 29, cognitive 57) · ×1
  • Complex function mergeShadowHead_ (cyclomatic 29, cognitive 57) src/multidoc-manager.js:317 — mergeShadowHead_ has cyclomatic complexity 29 and cognitive complexity 57; 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.
R2 · Cyclomatic Complexity · Complex function evaluateNextLevel (cyclomatic 27, cognitive 53) · ×1
  • Complex function evaluateNextLevel (cyclomatic 27, cognitive 53) src/service/url-expander/expander.js:144 — evaluateNextLevel has cyclomatic complexity 27 and cognitive complexity 53; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — 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.
R2 · Cyclomatic Complexity · Complex function onMessage_ (cyclomatic 27, cognitive 24) · ×1
  • Complex function onMessage_ (cyclomatic 27, cognitive 24) REDACTED:452 — onMessage_ has cyclomatic complexity 27 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 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.
R2 · Cyclomatic Complexity · Complex function pseudo (cyclomatic 26, cognitive 34) · ×1
  • Complex function pseudo (cyclomatic 26, cognitive 34) extensions/amp-animation/0.1/test/test-css-expr-parser.js:21 — pseudo has cyclomatic complexity 26 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.
R2 · Cyclomatic Complexity · Complex function parsePropDefs (cyclomatic 25, cognitive 49) · ×1
  • Complex function parsePropDefs (cyclomatic 25, cognitive 49) src/preact/parse-props.js:167 — parsePropDefs has cyclomatic complexity 25 and cognitive complexity 49; 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.
R2 · Cyclomatic Complexity · Complex function rerender_ (cyclomatic 25, cognitive 40) · ×1
  • Complex function rerender_ (cyclomatic 25, cognitive 40) src/preact/base-element.js:611 — rerender_ has cyclomatic complexity 25 and cognitive complexity 40; 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.
R2 · Cyclomatic Complexity · Complex function applyBinding_ (cyclomatic 25, cognitive 38) · ×1
  • Complex function applyBinding_ (cyclomatic 25, cognitive 38) extensions/amp-bind/0.1/bind-impl.js:1306 — applyBinding_ has cyclomatic complexity 25 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.
R2 · Cyclomatic Complexity · Complex function reportError (cyclomatic 24, cognitive 31) · ×1
  • Complex function reportError (cyclomatic 24, cognitive 31) src/error-reporting.js:154 — reportError has cyclomatic complexity 24 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.
R2 · Cyclomatic Complexity · Complex function updateVisibilityState_ (cyclomatic 24, cognitive 27) · ×1
  • Complex function updateVisibilityState_ (cyclomatic 24, cognitive 27) src/service/ampdoc-impl.js:567 — updateVisibilityState_ has cyclomatic complexity 24 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — 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.
R2 · Cyclomatic Complexity · Complex function registerScript_ (cyclomatic 23, cognitive 19) · ×1
  • Complex function registerScript_ (cyclomatic 23, cognitive 19) extensions/amp-ad-network-fake-impl/0.1/external-reorder-head-transformer.js:130 — registerScript_ has cyclomatic complexity 23 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.
R2 · Cyclomatic Complexity · Complex function parseActionMap (cyclomatic 22, cognitive 37) · ×1
  • Complex function parseActionMap (cyclomatic 22, cognitive 37) src/service/action-impl.js:949 — parseActionMap 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.
R2 · Cyclomatic Complexity · Complex function measure (cyclomatic 22, cognitive 29) · ×1
  • Complex function measure (cyclomatic 22, cognitive 29) src/service/fixed-layer.js:418 — measure has cyclomatic complexity 22 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.
R2 · Cyclomatic Complexity · Complex function isValidAttr (cyclomatic 22, cognitive 24) · ×1
  • Complex function isValidAttr (cyclomatic 22, cognitive 24) src/purifier/sanitation.js:363 — isValidAttr has cyclomatic complexity 22 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.
R2 · Cyclomatic Complexity · Complex function getBlockParameters_ (cyclomatic 22, cognitive 23) · ×1
  • Complex function getBlockParameters_ (cyclomatic 22, cognitive 23) REDACTED:689 — getBlockParameters_ has cyclomatic complexity 22 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.
R2 · Cyclomatic Complexity · Complex function createKeyframes_ (cyclomatic 21, cognitive 46) · ×1
  • Complex function createKeyframes_ (cyclomatic 21, cognitive 46) extensions/amp-animation/0.1/web-animations.js:463 — createKeyframes_ has cyclomatic complexity 21 and cognitive complexity 46; 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.
R2 · Cyclomatic Complexity · Complex function experimentToggles (cyclomatic 21, cognitive 31) · ×1
  • Complex function experimentToggles (cyclomatic 21, cognitive 31) src/experiments/index.js:114 — experimentToggles has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function connectedCallback (cyclomatic 21, cognitive 29) · ×1
  • Complex function connectedCallback (cyclomatic 21, cognitive 29) src/custom-element.js:1148 — connectedCallback has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function onDocumentFormSubmit_ (cyclomatic 21, cognitive 23) · ×1
  • Complex function onDocumentFormSubmit_ (cyclomatic 21, cognitive 23) src/document-submit.js:36 — onDocumentFormSubmit_ has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function prCheck (cyclomatic 21, cognitive 21) · ×1
  • Complex function prCheck (cyclomatic 21, cognitive 21) build-system/tasks/pr-check.js:25 — prCheck has cyclomatic complexity 21 and cognitive complexity 21; 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.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 21, cognitive 19) · ×1
  • Complex function (anonymous) (cyclomatic 21, cognitive 19) ads/google/a4a/utils.js:297 — (anonymous) has cyclomatic complexity 21 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.
R2 · Cyclomatic Complexity · Complex function videonow (cyclomatic 21, cognitive 18) · ×1
  • Complex function videonow (cyclomatic 21, cognitive 18) ads/vendors/videonow.js:10 — videonow has cyclomatic complexity 21 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 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.
R2 · Cyclomatic Complexity · Complex function hoistProperties (cyclomatic 20, cognitive 37) · ×1
  • Complex function hoistProperties (cyclomatic 20, cognitive 37) build-system/compile/json-schema/index.js:273 — hoistProperties has cyclomatic complexity 20 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.
R2 · Cyclomatic Complexity · Complex function checkStaticEnumUse (cyclomatic 20, cognitive 30) · ×1
  • Complex function checkStaticEnumUse (cyclomatic 20, cognitive 30) build-system/eslint-rules/enums.js:91 — checkStaticEnumUse has cyclomatic complexity 20 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.
R2 · Cyclomatic Complexity · Complex function applyStaticLayout (cyclomatic 20, cognitive 23) · ×1
  • Complex function applyStaticLayout (cyclomatic 20, cognitive 23) src/core/static-layout.js:100 — applyStaticLayout has cyclomatic complexity 20 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.
R2 · Cyclomatic Complexity · Complex function ThisExpression (cyclomatic 20, cognitive 22) · ×1
  • Complex function ThisExpression (cyclomatic 20, cognitive 22) build-system/eslint-rules/no-invalid-this.js:38 — ThisExpression has cyclomatic complexity 20 and cognitive complexity 22; 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.
R2 · Cyclomatic Complexity · Complex function buildCallback (cyclomatic 19, cognitive 26) · ×1
  • Complex function buildCallback (cyclomatic 19, cognitive 26) REDACTED:332 — buildCallback has cyclomatic complexity 19 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 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.
R2 · Cyclomatic Complexity · Complex function getAmpAdMetadata (cyclomatic 19, cognitive 23) · ×1
  • Complex function getAmpAdMetadata (cyclomatic 19, cognitive 23) extensions/amp-a4a/0.1/amp-a4a.js:2244 — getAmpAdMetadata 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.
R2 · Cyclomatic Complexity · Complex function findCountry_ (cyclomatic 19, cognitive 23) · ×1
  • Complex function findCountry_ (cyclomatic 19, cognitive 23) extensions/amp-geo/0.1/amp-geo.js:181 — findCountry_ 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.
R3 · Large Files · extensions/amp-story/1.0/amp-story.js · ×1
  • extensions/amp-story/1.0/amp-story.js: 2533 lines of code extensions/amp-story/1.0/amp-story.js:1 — extensions/amp-story/1.0/amp-story.js has 2533 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 · extensions/amp-a4a/0.1/amp-a4a.js · ×1
  • extensions/amp-a4a/0.1/amp-a4a.js: 2494 lines of code extensions/amp-a4a/0.1/amp-a4a.js:1 — extensions/amp-a4a/0.1/amp-a4a.js has 2494 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 · src/custom-element.js · ×1
  • src/custom-element.js: 2037 lines of code src/custom-element.js:1 — src/custom-element.js has 2037 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 · REDACTED · ×1
  • REDACTED: 1962 lines of code REDACTED:1 — REDACTED has 1962 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 · REDACTED · ×1
  • REDACTED: 1830 lines of code REDACTED:1 — REDACTED has 1830 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 · src/amp-story-player/amp-story-player-impl.js · ×1
  • src/amp-story-player/amp-story-player-impl.js: 1795 lines of code src/amp-story-player/amp-story-player-impl.js:1 — src/amp-story-player/amp-story-player-impl.js has 1795 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 · REDACTED · ×1
  • REDACTED: 1737 lines of code REDACTED:1 — REDACTED has 1737 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 · extensions/amp-bind/0.1/bind-impl.js · ×1
  • extensions/amp-bind/0.1/bind-impl.js: 1720 lines of code extensions/amp-bind/0.1/bind-impl.js:1 — extensions/amp-bind/0.1/bind-impl.js has 1720 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 · src/service/resources-impl.js · ×1
  • src/service/resources-impl.js: 1654 lines of code src/service/resources-impl.js:1 — src/service/resources-impl.js has 1654 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 · extensions/amp-analytics/0.1/events.js · ×1
  • extensions/amp-analytics/0.1/events.js: 1625 lines of code extensions/amp-analytics/0.1/events.js:1 — extensions/amp-analytics/0.1/events.js has 1625 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 · REDACTED · ×1
  • REDACTED: 1586 lines of code REDACTED:1 — REDACTED has 1586 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 · extensions/amp-list/0.1/amp-list.js · ×1
  • extensions/amp-list/0.1/amp-list.js: 1563 lines of code extensions/amp-list/0.1/amp-list.js:1 — extensions/amp-list/0.1/amp-list.js has 1563 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 · extensions/amp-form/0.1/amp-form.js · ×1
  • extensions/amp-form/0.1/amp-form.js: 1531 lines of code extensions/amp-form/0.1/amp-form.js:1 — extensions/amp-form/0.1/amp-form.js has 1531 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 · extensions/amp-video-docking/0.1/amp-video-docking.js · ×1
  • extensions/amp-video-docking/0.1/amp-video-docking.js: 1497 lines of code extensions/amp-video-docking/0.1/amp-video-docking.js:1 — extensions/amp-video-docking/0.1/amp-video-docking.js has 1497 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 · REDACTED · ×1
  • REDACTED: 1476 lines of code REDACTED:1 — REDACTED has 1476 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 · src/service/video-manager-impl.js · ×1
  • src/service/video-manager-impl.js: 1390 lines of code src/service/video-manager-impl.js:1 — src/service/video-manager-impl.js has 1390 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 · ads/_config.js · ×1
  • ads/_config.js: 1323 lines of code ads/_config.js:1 — ads/_config.js has 1323 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 · extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js · ×1
  • extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js: 1310 lines of code extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js:1 — extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js has 1310 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 · src/service/action-impl.js · ×1
  • src/service/action-impl.js: 1297 lines of code src/service/action-impl.js:1 — src/service/action-impl.js has 1297 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 · REDACTED · ×1
  • REDACTED: 1283 lines of code REDACTED:1 — REDACTED has 1283 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 · extensions/amp-animation/0.1/parsers/css-expr-ast.js · ×1
  • extensions/amp-animation/0.1/parsers/css-expr-ast.js: 1280 lines of code extensions/amp-animation/0.1/parsers/css-expr-ast.js:1 — extensions/amp-animation/0.1/parsers/css-expr-ast.js has 1280 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 · extensions/amp-base-carousel/0.1/carousel.js · ×1
  • extensions/amp-base-carousel/0.1/carousel.js: 1220 lines of code extensions/amp-base-carousel/0.1/carousel.js:1 — extensions/amp-base-carousel/0.1/carousel.js has 1220 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 · extensions/amp-animation/0.1/web-animations.js · ×1
  • extensions/amp-animation/0.1/web-animations.js: 1214 lines of code extensions/amp-animation/0.1/web-animations.js:1 — extensions/amp-animation/0.1/web-animations.js has 1214 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 · build-system/test-configs/forbidden-terms.js · ×1
  • build-system/test-configs/forbidden-terms.js: 1149 lines of code build-system/test-configs/forbidden-terms.js:1 — build-system/test-configs/forbidden-terms.js has 1149 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 · src/service/url-replacements-impl.js · ×1
  • src/service/url-replacements-impl.js: 1135 lines of code src/service/url-replacements-impl.js:1 — src/service/url-replacements-impl.js has 1135 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 · src/service/viewport/viewport-impl.js · ×1
  • src/service/viewport/viewport-impl.js: 1125 lines of code src/service/viewport/viewport-impl.js:1 — src/service/viewport/viewport-impl.js has 1125 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 · extensions/amp-image-lightbox/0.1/amp-image-lightbox.js · ×1
  • extensions/amp-image-lightbox/0.1/amp-image-lightbox.js: 1110 lines of code extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:1 — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js has 1110 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 · extensions/amp-story/1.0/page-advancement.js · ×1
  • extensions/amp-story/1.0/page-advancement.js: 1082 lines of code extensions/amp-story/1.0/page-advancement.js:1 — extensions/amp-story/1.0/page-advancement.js has 1082 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 · src/service/fixed-layer.js · ×1
  • src/service/fixed-layer.js: 1056 lines of code src/service/fixed-layer.js:1 — src/service/fixed-layer.js has 1056 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 · src/service/history-impl.js · ×1
  • src/service/history-impl.js: 1041 lines of code src/service/history-impl.js:1 — src/service/history-impl.js has 1041 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 · extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js · ×1
  • extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js: 1037 lines of code extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js:1 — extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js has 1037 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 · REDACTED · ×1
  • REDACTED: 1006 lines of code REDACTED:1 — REDACTED has 1006 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 · extensions/amp-carousel/0.1/slidescroll.js · ×1
  • extensions/amp-carousel/0.1/slidescroll.js: 1002 lines of code extensions/amp-carousel/0.1/slidescroll.js:1 — extensions/amp-carousel/0.1/slidescroll.js has 1002 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 · ads/google/a4a/utils.js · ×1
  • ads/google/a4a/utils.js: 995 lines of code ads/google/a4a/utils.js:1 — ads/google/a4a/utils.js has 995 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 · src/base-element.js · ×1
  • src/base-element.js: 979 lines of code src/base-element.js:1 — src/base-element.js has 979 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 · src/service/ampdoc-impl.js · ×1
  • src/service/ampdoc-impl.js: 974 lines of code src/service/ampdoc-impl.js:1 — src/service/ampdoc-impl.js has 974 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 · extensions/amp-video/0.1/amp-video.js · ×1
  • extensions/amp-video/0.1/amp-video.js: 972 lines of code extensions/amp-video/0.1/amp-video.js:1 — extensions/amp-video/0.1/amp-video.js has 972 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 · extensions/amp-consent/0.1/amp-consent.js · ×1
  • extensions/amp-consent/0.1/amp-consent.js: 969 lines of code extensions/amp-consent/0.1/amp-consent.js:1 — extensions/amp-consent/0.1/amp-consent.js has 969 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 · extensions/amp-story/1.0/media-pool.js · ×1
  • extensions/amp-story/1.0/media-pool.js: 963 lines of code extensions/amp-story/1.0/media-pool.js:1 — extensions/amp-story/1.0/media-pool.js has 963 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 · extensions/amp-web-push/0.1/web-push-service.js · ×1
  • extensions/amp-web-push/0.1/web-push-service.js: 952 lines of code extensions/amp-web-push/0.1/web-push-service.js:1 — extensions/amp-web-push/0.1/web-push-service.js has 952 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~1081 LoC) · ×1
  • Dead file (~1081 LoC) build-system/externs/amp.extern.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~972 LoC) · ×1
  • Dead file (~972 LoC) testing/describes.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (testing/init-tests-helpers.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
R7 · Dead Code · Dead file (~926 LoC) · ×1
  • Dead file (~926 LoC) extensions/amp-image-viewer/0.1/amp-image-viewer.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~835 LoC) · ×1
  • Dead file (~835 LoC) extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-preview.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.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
R7 · Dead Code · Dead file (~781 LoC) · ×1
  • Dead file (~781 LoC) extensions/amp-image-slider/0.1/amp-image-slider.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~621 LoC) · ×1
  • Dead file (~621 LoC) extensions/amp-sidebar/1.0/storybook/Basic.amp.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~610 LoC) · ×1
  • Dead file (~610 LoC) build-system/tasks/release/index.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~579 LoC) · ×1
  • Dead file (~579 LoC) REDACTED — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~539 LoC) · ×1
  • Dead file (~539 LoC) build-system/tasks/sweep-experiments/index.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~516 LoC) · ×1
  • Dead file (~516 LoC) src/bento/components/bento-autocomplete/1.0/component/component.tsx — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (src/bento/components/bento-autocomplete/1.0/component.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
R7 · Dead Code · Dead file (~408 LoC) · ×1
  • Dead file (~408 LoC) src/bento/components/bento-mega-menu/1.0/storybook/Basic.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~398 LoC) · ×1
  • Dead file (~398 LoC) extensions/amp-sidebar/1.0/storybook/Basic.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~350 LoC) · ×1
  • Dead file (~350 LoC) extensions/amp-lightbox/1.0/storybook/Basic.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~347 LoC) · ×1
  • Dead file (~347 LoC) extensions/amp-lightbox/1.0/storybook/Basic.amp.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~325 LoC) · ×1
  • Dead file (~325 LoC) build-system/tasks/dep-check.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~297 LoC) · ×1
  • Dead file (~297 LoC) extensions/amp-access-scroll/0.1/scroll-impl.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/amp-access-scroll/0.1/amp-access-scroll.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
R7 · Dead Code · Dead file (~275 LoC) · ×1
  • Dead file (~275 LoC) build-system/tasks/bundle-size/index.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~259 LoC) · ×1
  • Dead file (~259 LoC) extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~258 LoC) · ×1
  • Dead file (~258 LoC) extensions/amp-lightbox-gallery/1.0/storybook/Basic.amp.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~253 LoC) · ×1
  • Dead file (~253 LoC) REDACTED — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~251 LoC) · ×1
  • Dead file (~251 LoC) extensions/amp-inline-gallery/0.1/amp-inline-gallery-pagination.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (extensions/amp-inline-gallery/0.1/amp-inline-gallery-captions.js, extensions/amp-inline-gallery/0.1/amp-inline-gallery.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
R7 · Dead Code · Dead file (~249 LoC) · ×1
  • Dead file (~249 LoC) REDACTED — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~241 LoC) · ×1
  • Dead file (~241 LoC) extensions/amp-inline-gallery/0.1/amp-inline-gallery-thumbnails.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/amp-inline-gallery/0.1/amp-inline-gallery.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
R7 · Dead Code · Dead file (~238 LoC) · ×1
  • Dead file (~238 LoC) extensions/amp-story-dev-tools/0.1/amp-story-dev-tools-tab-debug.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (extensions/amp-story-dev-tools/0.1/amp-story-dev-tools.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
R7 · Dead Code · Dead file (~232 LoC) · ×1
  • Dead file (~232 LoC) REDACTED — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~229 LoC) · ×1
  • Dead file (~229 LoC) extensions/amp-list/1.0/storybook/Basic.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~219 LoC) · ×1
  • Dead file (~219 LoC) extensions/amp-a4a/0.1/amp-ad-network-base.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~213 LoC) · ×1
  • Dead file (~213 LoC) extensions/amp-soundcloud/1.0/storybook/Basic.amp.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~210 LoC) · ×1
  • Dead file (~210 LoC) extensions/amp-base-carousel/1.0/storybook/Basic.amp.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~205 LoC) · ×1
  • Dead file (~205 LoC) extensions/amp-twitter/1.0/storybook/Basic.amp.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~204 LoC) · ×1
  • Dead file (~204 LoC) extensions/amp-inline-gallery/1.0/storybook/Basic.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~192 LoC) · ×1
  • Dead file (~192 LoC) testing/init-tests-helpers.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (testing/init-tests.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
R7 · Dead Code · Dead file (~179 LoC) · ×1
  • Dead file (~179 LoC) testing/console-logging-setup.js — no import path from any entry point (405 application, 71 tooling, 1196 test roots considered), but 2 in-repo import(s) from 2 other file(s) do name it (testing/async-errors.js, testing/init-tests-helpers.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
R7 · Dead Code · Dead file (~178 LoC) · ×1
  • Dead file (~178 LoC) extensions/amp-stream-gallery/1.0/storybook/Basic.amp.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~176 LoC) · ×1
  • Dead file (~176 LoC) extensions/amp-mraid/0.1/amp-mraid.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R7 · Dead Code · Dead file (~175 LoC) · ×1
  • Dead file (~175 LoC) extensions/amp-web-push/0.1/amp-web-push.service-worker.js — no import path from any entry point (405 application, 71 tooling, 1196 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
R8 · Dependency Hygiene · Unlisted import '@babel/traverse' · ×1
  • Unlisted import '@babel/traverse' build-system/compile/json-schema/index.js:271 — Imported only as a TYPE and declared in no reachable REDACTED. 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 REDACTED.
R8 · Dependency Hygiene · Unused dependency '@puppeteer/browsers' · ×1
  • Unused dependency '@puppeteer/browsers' — Declared in build-system/tasks/visual-diff/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'google-closure-compiler-java' · ×1
  • Unused dependency 'google-closure-compiler-java' — Declared in validator/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency 'jasmine-console-reporter' · ×1
  • Unused dependency 'jasmine-console-reporter' — Declared in validator/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/font-roboto' · ×1
  • Unused dependency '@polymer/font-roboto' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-a11y-announcer' · ×1
  • Unused dependency '@polymer/iron-a11y-announcer' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-a11y-keys-behavior' · ×1
  • Unused dependency '@polymer/iron-a11y-keys-behavior' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-behaviors' · ×1
  • Unused dependency '@polymer/iron-behaviors' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-dropdown' · ×1
  • Unused dependency '@polymer/iron-dropdown' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-fit-behavior' · ×1
  • Unused dependency '@polymer/iron-fit-behavior' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-flex-layout' · ×1
  • Unused dependency '@polymer/iron-flex-layout' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-form-element-behavior' · ×1
  • Unused dependency '@polymer/iron-form-element-behavior' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-icon' · ×1
  • Unused dependency '@polymer/iron-icon' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-icons' · ×1
  • Unused dependency '@polymer/iron-icons' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-iconset-svg' · ×1
  • Unused dependency '@polymer/iron-iconset-svg' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-input' · ×1
  • Unused dependency '@polymer/iron-input' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-menu-behavior' · ×1
  • Unused dependency '@polymer/iron-menu-behavior' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-meta' · ×1
  • Unused dependency '@polymer/iron-meta' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-overlay-behavior' · ×1
  • Unused dependency '@polymer/iron-overlay-behavior' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-resizable-behavior' · ×1
  • Unused dependency '@polymer/iron-resizable-behavior' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-selector' · ×1
  • Unused dependency '@polymer/iron-selector' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/iron-validatable-behavior' · ×1
  • Unused dependency '@polymer/iron-validatable-behavior' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/neon-animation' · ×1
  • Unused dependency '@polymer/neon-animation' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-behaviors' · ×1
  • Unused dependency '@polymer/paper-behaviors' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-button' · ×1
  • Unused dependency '@polymer/paper-button' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-dropdown-menu' · ×1
  • Unused dependency '@polymer/paper-dropdown-menu' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-input' · ×1
  • Unused dependency '@polymer/paper-input' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-item' · ×1
  • Unused dependency '@polymer/paper-item' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-listbox' · ×1
  • Unused dependency '@polymer/paper-listbox' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-material' · ×1
  • Unused dependency '@polymer/paper-material' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-menu-button' · ×1
  • Unused dependency '@polymer/paper-menu-button' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-ripple' · ×1
  • Unused dependency '@polymer/paper-ripple' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-styles' · ×1
  • Unused dependency '@polymer/paper-styles' — Declared in validator/js/webui/REDACTED 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.
R8 · Dependency Hygiene · Unused dependency '@polymer/paper-toast' · ×1
  • Unused dependency '@polymer/paper-toast' — Declared in validator/js/webui/REDACTED 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.
S1 · Web-Security Posture · Third-party script without Subresource Integrity · ×1
  • Third-party script without Subresource Integrity REDACTED:68 — `https://cdn.ampproject.org/v0.js` is executed by this page with no Subresource Integrity. Whoever can answer that request — the CDN, anyone who compromises it, anyone on the network path — runs arbitrary script in this page's origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time — the executed bytes can change with nobody touching this repository. 34 such include(s) across the repository's markup.
X1 · Async correctness · `async` Promise executor · ×1
  • `async` Promise executor testing/helpers/index.js:59 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
Minor — 1188 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×892
  • Orphaned file src/custom-element.js: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 REDACTED: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 extensions/amp-bind/0.1/bind-impl.js: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 REDACTED: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 src/amp-story-player/amp-story-player-impl.js: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 extensions/amp-list/0.1/amp-list.js: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 extensions/amp-form/0.1/amp-form.js: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 extensions/amp-analytics/0.1/events.js: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 REDACTED: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 REDACTED: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 src/service/video-manager-impl.js: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 extensions/amp-video-docking/0.1/amp-video-docking.js: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 extensions/amp-lightbox-gallery/0.1/amp-lightbox-gallery.js: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 extensions/amp-base-carousel/0.1/carousel.js: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 REDACTED: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 src/service/action-impl.js: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 build-system/test-configs/forbidden-terms.js: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 src/service/url-replacements-impl.js: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 REDACTED: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 extensions/amp-animation/0.1/web-animations.js: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 extensions/amp-story/1.0/media-pool.js: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 src/service/fixed-layer.js: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 extensions/amp-subscriptions-google/0.1/amp-subscriptions-google.js: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 src/service/viewport/viewport-impl.js: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 extensions/amp-story/1.0/page-advancement.js: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.
  • + 867 more in this group — see findings.md.
D24 · Comment Value · redundant comment · ×83
  • redundant comment 3p/beopinion.js:52 — "add canonical link tag" repeats the code it sits on: 4 of its 4 words (add, canonical, link, tag) are already in `addCanonicalLinkTag(global);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:83 — "Event for mouse move." repeats the code it sits on: 3 of its 3 words (event, mouse, move) are already in `let mouseMoveEvent;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/clickio.js:83 — "load consent script" repeats the code it sits on: 3 of its 3 words (load, consent, script) are already in `loadScript(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/csa.js:269 — "Set initial AMP height" repeats the code it sits on: 4 of its 4 words (set, initial, amp, height) are already in `currentAmpHeight =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/dable.js:71 — "call render widget" repeats the code it sits on: 3 of its 3 words (call, render, widget) are already in `global.dable('renderWidget', slot.id, itemId, widgetOpts, function (hasAd)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/epeex.js:16 — "load the epeex AMP remote js file" repeats the code it sits on: 5 of its 6 words (load, epeex, amp, remote, js) are already in `loadScript(global, 'https://epeex.com/related/service/widget/amp/remote.js');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/imedia.js:28 — "create parent element" repeats the code it sits on: 3 of its 3 words (create, parent, element) are already in `const parentElement = document.createElement('div');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/insticator.js:16 — "create ads and embed" repeats the code it sits on: 3 of its 3 words (create, ads, embed) are already in `createAdsAndEmbed(data['siteId'], data['embedId']);`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/kargo.js:12 — "Kargo AdTag url" repeats the code it sits on: 4 of its 4 words (kargo, ad, tag, url) are already in `const kargoScriptUrl =`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/outbrain.js:22 — "load the Outbrain AMP JS file" repeats the code it sits on: 4 of its 5 words (load, outbrain, amp, js) are already in `loadScript(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/ssp.js:144 — "create parent element" repeats the code it sits on: 3 of its 3 words (create, parent, element) are already in `const parentElement = document.createElement('div');`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/uas.js:80 — "Reading PAGEURL from sourceUrl or location.href" repeats the code it sits on: 5 of its 6 words (pageurl, source, url, location, href) are already in `global.Phoenix.setInfo(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment ads/vendors/zedo.js:56 — "call load ads" repeats the code it sits on: 3 of its 3 words (call, load, ads) are already in `geckoTag.loadAds();`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment build-system/common/npm-checks.js:29 — "Check the lockfile version." repeats the code it sits on: 3 of its 3 words (check, lockfile, version) are already in `if (fs.readJsonSync(packageLockFile).lockfileVersion != 3)`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment build-system/pr-check/build-targets.js:360 — "Test all targets during CI builds for package upgrades." repeats the code it sits on: 5 of its 6 words (targets, ci, builds, package, upgrades) are already in `if (isCiBuild() && buildTargets.has(Targets.PACKAGE_UPGRADE))`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment REDACTED:1249 — "Store metering state." repeats the code it sits on: 3 of its 3 words (store, metering, state) are already in `meteringStateStore[ampReaderId] = meteringState;`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment build-system/tasks/check-links.js:150 — "Skip links to files that were introduced by the PR." repeats the code it sits on: 4 of its 5 words (links, files, introduced, pr) are already in `if (isLinkToFileIntroducedByPR(link) && status == 'dead')`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment build-system/tasks/release/index.js:45 — "Flavor config for the base flavor type." repeats the code it sits on: 4 of its 4 words (flavor, config, base, type) are already in `const BASE_FLAVOR_CONFIG = {`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment extensions/amp-a4a/0.1/amp-a4a.js:1172 — "Preload any AMP images." repeats the code it sits on: 3 of its 3 words (preload, amp, images) are already in `(creativeMetaDataDef.images || []).forEach(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment extensions/amp-a4a/0.1/head-validation.js:144 — "Preload any AMP images." repeats the code it sits on: 3 of its 3 words (preload, amp, images) are already in `images.forEach(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment extensions/amp-access-fewcents/0.1/fewcents-impl.js:385 — "Article price element" repeats the code it sits on: 3 of its 3 words (article, price, element) are already in `const articlePrice = createElementWithAttributes(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment extensions/amp-access-fewcents/0.1/fewcents-impl.js:397 — "Unlock button div element" repeats the code it sits on: 4 of its 4 words (unlock, button, div, element) are already in `const unlockButtonDiv = createElementWithAttributes(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment extensions/amp-access-scroll/0.1/test/read-depth-tracker.js:54 — "Stub viewport to fake paragraph positions" repeats the code it sits on: 4 of its 5 words (stub, viewport, fake, positions) are already in `env.sandbox`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment extensions/amp-ad/0.1/amp-ad-ui.js:153 — "Collapse the container element if there's one" repeats the code it sits on: 3 of its 3 words (collapse, container, element) are already in `attemptCollapsePromise = Services.mutatorForDoc(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • redundant comment extensions/amp-addthis/0.1/amp-addthis.js:436 — "Dispatch the configuration to the configManager on a CONFIGURATION_EVENT." repeats the code it sits on: 4 of its 5 words (configuration, config, manager, event) are already in `postMessageDispatcher.on(`. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence).
  • + 58 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate REDACTED:28 — `param == "" || err != nil || (u.Scheme != "http" && u.Scheme != "https")` 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 extensions/amp-a4a/0.1/amp-a4a.js:2610 — `!!func && func.toString().indexOf('[native code]') != -1` appears character-identically in 2 files — extensions/amp-a4a/0.1/amp-a4a.js, src/core/dom/web-components.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 build-system/eslint-rules/no-log-array.js:38 — `!calleeObject || calleeObject.type !== 'CallExpression'` appears character-identically in 2 files — build-system/eslint-rules/no-log-array.js, build-system/eslint-rules/no-mixed-interpolation.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 extensions/amp-imgur/0.1/amp-imgur.js:144 — `!eventData || !( isObject(eventData) || (eventData).startsWith('{') )` appears character-identically in 3 files — extensions/amp-imgur/0.1/amp-imgur.js, extensions/amp-instagram/0.1/amp-instagram.js, extensions/amp-megaphone/0.1/amp-megaphone.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:454 — `!this.iframe_ || !messageEvent || messageEvent.source != this.iframe_.contentWindow` appears character-identically in 2 files — REDACTED, extensions/amp-slikeplayer/0.1/amp-slikeplayer.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:444 — `!this.iframe_ || !this.iframe_.contentWindow` appears character-identically in 4 files — REDACTED, REDACTED, extensions/amp-slikeplayer/0.1/amp-slikeplayer.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 extensions/amp-access/0.1/amp-access-server-jwt.js:158 — `!this.isProxyOrigin_ || !this.serverState_` appears character-identically in 2 files — extensions/amp-access/0.1/amp-access-server-jwt.js, extensions/amp-access/0.1/amp-access-server.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 extensions/amp-social-share/1.0/amp-social-share.js:73 — `'share' in navigator && !isChromeWebview` appears character-identically in 2 files — extensions/amp-social-share/1.0/amp-social-share.js, extensions/amp-story/1.0/amp-story-share.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 ads/google/a4a/utils.js:336 — `(/(?:#|,)deid=([\d,]+)/i.exec(win.location.hash) || [])[1] || null` appears character-identically in 2 files — ads/google/a4a/utils.js, extensions/amp-auto-ads/0.1/adsense-network-config.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 ads/google/a4a/utils.js:427 — `(/^(?:https?:\/\/)?([^\/\?:]+)/i.exec(url) || [])[1] || url` appears character-identically in 2 files — ads/google/a4a/utils.js, extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.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 extensions/amp-access-laterpay/0.1/laterpay-impl.js:163 — `(getMode().localDev || getMode().development) && this.laterpayConfig_['configUrl']` appears character-identically in 2 files — extensions/amp-access-laterpay/0.1/laterpay-impl.js, extensions/amp-access-laterpay/0.2/laterpay-impl.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 ads/google/a4a/utils.js:113 — `(win['performance'] && win['performance']['timing'] && win['performance']['timing'][timingEvent]) || 0` appears character-identically in 2 files — ads/google/a4a/utils.js, extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.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 extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:539 — `Math.abs(newPosX - this.posX_) < 1 && Math.abs(newPosY - this.posY_) < 1` appears character-identically in 3 files — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js, extensions/amp-image-viewer/0.1/amp-image-viewer.js, extensions/amp-pan-zoom/0.1/amp-pan-zoom.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 extensions/amp-image-lightbox/0.1/amp-image-lightbox.js:281 — `Math.abs(width - this.sourceWidth_) <= 16 && Math.abs(height - this.sourceHeight_) <= 16` appears character-identically in 2 files — extensions/amp-image-lightbox/0.1/amp-image-lightbox.js, extensions/amp-pan-zoom/0.1/amp-pan-zoom.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 extensions/amp-date-countdown/0.1/amp-date-countdown.js:127 — `Number(this.element.getAttribute('offset-seconds')) || DEFAULT_OFFSET_SECONDS` appears character-identically in 2 files — extensions/amp-date-countdown/0.1/amp-date-countdown.js, extensions/amp-date-display/0.1/amp-date-display.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 extensions/amp-a4a/0.1/amp-a4a.js:663 — `WITHIN_VIEWPORT_INOB || getMode().localDev || getMode().test` appears character-identically in 2 files — extensions/amp-a4a/0.1/amp-a4a.js, extensions/amp-a4a/0.1/within-viewport.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 extensions/amp-carousel/0.2/amp-carousel.js:641 — `actionSource == ActionSource.WHEEL || actionSource == ActionSource.TOUCH || actionSource == ActionSource.GENERIC_HIGH_TRUST` appears character-identically in 2 files — extensions/amp-carousel/0.2/amp-carousel.js, extensions/amp-stream-gallery/0.1/amp-stream-gallery.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:928 — `ampdoc.getRootNode().documentElement || ampdoc.getBody()` appears character-identically in 2 files — REDACTED, extensions/amp-font/0.1/amp-font.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 extensions/amp-skimlinks/0.1/tracking.js:125 — `anchor.getAttribute(XCUST_ATTRIBUTE_NAME) || customTrackingId` appears character-identically in 2 files — extensions/amp-skimlinks/0.1/tracking.js, extensions/amp-skimlinks/0.1/waypoint.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 build-system/babel-config/minified-config.js:17 — `argv._.includes('dist') && !argv.fortesting` appears character-identically in 2 files — build-system/babel-config/minified-config.js, build-system/compile/build-constants.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 build-system/eslint-rules/no-log-array.js:30 — `callee.type == 'Identifier' && assertAliases.includes(callee.name)` appears character-identically in 2 files — build-system/eslint-rules/no-log-array.js, build-system/eslint-rules/no-mixed-interpolation.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 extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:458 — `checksum && stringHash32(utf8Decode(bytes)) == checksum` appears character-identically in 2 files — extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.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 extensions/amp-experiment/0.1/amp-experiment.js:72 — `children.length == 1 && children[0].tagName == 'SCRIPT' && children[0].getAttribute('type').toUpperCase() == 'APPLICATION/JSON'` appears character-identically in 2 files — extensions/amp-experiment/0.1/amp-experiment.js, extensions/amp-experiment/1.0/amp-experiment.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 extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.js:536 — `creativeMetaData && !creativeMetaData.customElementExtensions.includes('amp-ad-exit')` appears character-identically in 2 files — extensions/amp-ad-network-adsense-impl/0.1/amp-ad-network-adsense-impl.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 ads/vendors/nativery.js:16 — `data.referrer || global.context.referrer` appears character-identically in 2 files — ads/vendors/nativery.js, ads/vendors/taboola.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.
  • + 15 more in this group — see findings.md.
D12 · Dependency Hygiene · Outdated (npm) · ×32
  • Outdated (npm): @polymer/font-roboto validator/js/webui/REDACTED:15 — @polymer/font-roboto is pinned at 0.0.3; registry.npmjs.org publishes 3.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-a11y-announcer validator/js/webui/REDACTED:16 — @polymer/iron-a11y-announcer is pinned at 0.0.3; registry.npmjs.org publishes 3.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-a11y-keys-behavior validator/js/webui/REDACTED:17 — @polymer/iron-a11y-keys-behavior is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-behaviors validator/js/webui/REDACTED:18 — @polymer/iron-behaviors is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-dropdown validator/js/webui/REDACTED:19 — @polymer/iron-dropdown is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-fit-behavior validator/js/webui/REDACTED:20 — @polymer/iron-fit-behavior is pinned at 0.0.3; registry.npmjs.org publishes 3.1.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-flex-layout validator/js/webui/REDACTED:21 — @polymer/iron-flex-layout is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-form-element-behavior validator/js/webui/REDACTED:22 — @polymer/iron-form-element-behavior is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-icon validator/js/webui/REDACTED:23 — @polymer/iron-icon is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-icons validator/js/webui/REDACTED:24 — @polymer/iron-icons is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-iconset-svg validator/js/webui/REDACTED:25 — @polymer/iron-iconset-svg is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-input validator/js/webui/REDACTED:26 — @polymer/iron-input is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-menu-behavior validator/js/webui/REDACTED:27 — @polymer/iron-menu-behavior is pinned at 0.0.3; registry.npmjs.org publishes 3.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-meta validator/js/webui/REDACTED:28 — @polymer/iron-meta is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-overlay-behavior validator/js/webui/REDACTED:29 — @polymer/iron-overlay-behavior is pinned at 0.0.3; registry.npmjs.org publishes 3.0.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-resizable-behavior validator/js/webui/REDACTED:30 — @polymer/iron-resizable-behavior is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-selector validator/js/webui/REDACTED:31 — @polymer/iron-selector is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/iron-validatable-behavior validator/js/webui/REDACTED:32 — @polymer/iron-validatable-behavior is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/neon-animation validator/js/webui/REDACTED:33 — @polymer/neon-animation is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/paper-behaviors validator/js/webui/REDACTED:34 — @polymer/paper-behaviors is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/paper-button validator/js/webui/REDACTED:35 — @polymer/paper-button is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/paper-dropdown-menu validator/js/webui/REDACTED:36 — @polymer/paper-dropdown-menu is pinned at 0.0.3; registry.npmjs.org publishes 3.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/paper-input validator/js/webui/REDACTED:37 — @polymer/paper-input is pinned at 0.0.3; registry.npmjs.org publishes 3.2.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/paper-item validator/js/webui/REDACTED:38 — @polymer/paper-item is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @polymer/paper-listbox validator/js/webui/REDACTED:39 — @polymer/paper-listbox is pinned at 0.0.3; registry.npmjs.org publishes 3.0.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • + 7 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED · ×25
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D12 · Dependency Hygiene · Deprecated · ×12
  • Deprecated: stable REDACTED:1788 — stable 0.1.8 is resolved in REDACTED and is marked deprecated by its publisher: "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @humanwhocodes/config-array REDACTED:3623 — @humanwhocodes/config-array 0.13.0 is resolved in REDACTED and is marked deprecated by its publisher: "Use @eslint/config-array instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: @humanwhocodes/object-schema REDACTED:3663 — @humanwhocodes/object-schema 2.0.3 is resolved in REDACTED and is marked deprecated by its publisher: "Use @eslint/object-schema instead". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:19294 — glob 8.1.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: fsevents REDACTED:1522 — fsevents 1.2.13 is resolved in REDACTED and is marked deprecated by its publisher: "Upgrade to fsevents v2 to mitigate potential security issues". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:1589 — glob 7.2.0 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: inflight REDACTED:1964 — inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: resolve-url REDACTED:3992 — resolve-url 0.2.1 is resolved in REDACTED and is marked deprecated by its publisher: "https://github.com/lydell/resolve-url#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: source-map-resolve REDACTED:4224 — source-map-resolve 0.5.3 is resolved in REDACTED and is marked deprecated by its publisher: "See https://github.com/lydell/source-map-resolve#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: source-map-url REDACTED:4239 — source-map-url 0.4.1 is resolved in REDACTED and is marked deprecated by its publisher: "See https://github.com/lydell/source-map-url#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: urix REDACTED:4849 — urix 0.1.0 is resolved in REDACTED and is marked deprecated by its publisher: "Please see https://github.com/lydell/urix#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: core-js REDACTED:487 — core-js 2.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
D29 · Static Analysis (SAST) · REDACTED · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Low CVE · ×12
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
IC1 · Incompleteness & stubs · Blanket warning suppression · ×11
  • Blanket warning suppression ads/vendors/rubicon.js:35 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-amp-mode-transformer/index.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-nomodule-loader/define-template.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-transform-amp-asserts/index.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-transform-amp-extension-call/index.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-transform-function-declarations/index.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-transform-html-template/index.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression REDACTED:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-transform-jss/index.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/babel-plugins/babel-plugin-transform-log-methods/index.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
  • Blanket warning suppression build-system/server/app-video-testbench.js:1 — A bare `eslint-disable` or `@ts-nocheck` with no rule list switches every lint rule or the whole type checker off for the rest of the file — hidden debt. Disable the specific rule on the specific line, with a justification, instead.
GD1 · Unfinished & placeholder code · Placeholder literal left in code · ×6
  • Placeholder literal left in code REDACTED:726 — A placeholder string ("</a> </h3> <div class="a…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code extensions/amp-lightbox-gallery/1.0/storybook/Basic.js:32 — A placeholder string ("This is the caption for the first image.…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code extensions/amp-lightbox-gallery/1.0/storybook/Basic.js:130 — A placeholder string ("This is the caption for the first image.…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code extensions/amp-lightbox-gallery/1.0/storybook/Basic.js:150 — A placeholder string ("Image 1 long. Lorem Ipsum is simply dumm…") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code extensions/amp-list/1.0/storybook/Basic.js:70 — A placeholder string ("Lorem ipsum dolor sit amet, consectetur …") is still in shipped code — typical of generated boilerplate that was never filled in.
  • Placeholder literal left in code extensions/amp-pan-zoom/1.0/storybook/Basic.js:13 — A placeholder string ("Lorem ipsum dolor sit amet, consectetur …") is still in shipped code — typical of generated boilerplate that was never filled in.
M4 · Documentation accuracy · README/code drift · ×6
  • README/code drift src/compiler/README.md:4 — src/compiler/README.md links to `./builders.js`, but `src/compiler/builders.js` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift extensions/amp-accordion/1.0/README.md:736 — extensions/amp-accordion/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift extensions/amp-inline-gallery/1.0/README.md:210 — extensions/amp-inline-gallery/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift extensions/amp-stream-gallery/1.0/README.md:392 — extensions/amp-stream-gallery/1.0/README.md links to `../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift src/bento/components/bento-accordion/1.0/README.md:736 — src/bento/components/bento-accordion/1.0/README.md links to `../../../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
  • README/code drift src/bento/components/bento-inline-gallery/1.0/README.md:210 — src/bento/components/bento-inline-gallery/1.0/README.md links to `../../../../../docs/spec/bento-common-props.md`, but `docs/spec/bento-common-props.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every REDACTED, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
IC1 · Incompleteness & stubs · Disabled test · ×5
  • Disabled test extensions/amp-3d-gltf/0.1/test/test-amp-3d-gltf.js:60 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test extensions/amp-3d-gltf/0.1/test/test-amp-3d-gltf.js:66 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test extensions/amp-3d-gltf/0.1/test/test-amp-3d-gltf.js:80 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test extensions/amp-a4a/0.1/test/test-signature-verifier.js:33 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
  • Disabled test extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:463 — A test is skipped/ignored — coverage that looks present but never runs. Re-enable it or delete it so the green run means something.
P2 · Observability · Console output used as the logging channel · ×4
  • Console output used as the logging channel src/preact/storybook/Hooks.js:29 — `src/preact/storybook/Hooks.js` reports through `console.*` at line 29 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel extensions/amp-app-banner/1.0/storybook/Basic.js:7 — `extensions/amp-app-banner/1.0/storybook/Basic.js` reports through `console.*` at line 7 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel build-system/server/new-server/transforms/modules/modules-transform.ts:78 — `build-system/server/new-server/transforms/modules/modules-transform.ts` reports through `console.*` at line 78 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel ads/vendors/affinity.js:104 — `ads/vendors/affinity.js` reports through `console.*` at line 104 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
X7 · Silent fallback defaults · Silent fallback default in catch · ×4
  • Silent fallback default in catch ads/google/a4a/utils.js:416 — `getHistoryLength` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch ads/vendors/adincube.js:44 — `parseParams` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch extensions/amp-ad-network-valueimpression-impl/0.1/amp-ad-network-valueimpression-impl.js:395 — `getHistoryLength` swallows every exception into `return 0` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
  • Silent fallback default in catch src/cookies.js:57 — `tryGetDocumentCookie_` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
D30 · Dependency Vulnerabilities · Low vulnerability · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file extensions/amp-a4a/0.1/amp-a4a.js:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file extensions/amp-story/1.0/amp-story.js:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file REDACTED:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D21 · Naming Consistency · `pollAMPDoc_` spells `AMP` where 188 names in the project spell it `Amp` · ×2
  • `pollAMPDoc_` spells `AMP` where 188 names in the project spell it `Amp` extensions/amp-viewer-integration/0.1/viewer-initiated-handshake-viewer-for-testing.js:94 — 188 of 192 names in project amp-html spell the token `Amp` (188 of 192; unit: names in project amp-html containing `Amp`). Peers: GltfViewer.toggleAmpPlay_ (3p/3d-gltf/viewer.js:262); GltfViewer.toggleAmpViewport_ (3p/3d-gltf/viewer.js:270); 3p.ampcontext-integration.IntegrationAmpContext (3p/ampcontext-integration.js:36); 3p.ampcontext.AbstractAmpContext (3p/ampcontext.js:14); frame-metadata.getAmpConfig (3p/frame-metadata.js:62). Rename to `pollAmpDoc_`. [rule N6]
  • `pollAMPDoc_` spells `AMP` where 188 names in the project spell it `Amp` REDACTED:101 — 188 of 192 names in project amp-html spell the token `Amp` (188 of 192; unit: names in project amp-html containing `Amp`). Peers: GltfViewer.toggleAmpPlay_ (3p/3d-gltf/viewer.js:262); GltfViewer.toggleAmpViewport_ (3p/3d-gltf/viewer.js:270); 3p.ampcontext-integration.IntegrationAmpContext (3p/ampcontext-integration.js:36); 3p.ampcontext.AbstractAmpContext (3p/ampcontext.js:14); frame-metadata.getAmpConfig (3p/frame-metadata.js:62). Rename to `pollAmpDoc_`. [rule N6]
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 2 significant file(s) lose their only recent owner: REDACTED, REDACTED. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 5 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 (7 single-owned of 776 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; 776 of the 1745 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (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: extensions/amp-slikeplayer/0.1/amp-slikeplayer.js, src/impression.js, build-system/common/update-packages.js, extensions/amp-ad-network-mgid-impl/0.1/amp-ad-network-mgid-impl.js, ads/google/a4a/cookie-utils.js.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:1 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `getURL` spells `URL` where 440 names in the project spell it `Url` · ×1
  • `getURL` spells `URL` where 440 names in the project spell it `Url` ads/vendors/a9.js:97 — 440 of 446 names in project amp-html spell the token `Url` (440 of 446; unit: names in project amp-html containing `Url`). Peers: AbstractAmpContext.canonicalUrl (3p/ampcontext.js:43); AbstractAmpContext.sourceUrl (3p/ampcontext.js:97); recaptcha.initRecaptcha(recaptchaApiBaseUrl) (3p/recaptcha.js:70); handler.getEventualUrl (ads/alp/handler.js:120); url-builder.buildUrl (ads/google/a4a/shared/url-builder.js:15). Rename to `getUrl`. [rule N6]
D21 · Naming Consistency · `parseJSONObj` spells `JSON` where 86 names in the project spell it `Json` · ×1
  • `parseJSONObj` spells `JSON` where 86 names in the project spell it `Json` ads/vendors/adocean.js:64 — 86 of 87 names in project amp-html spell the token `Json` (86 of 87; unit: names in project amp-html containing `Json`). Peers: line-delimited-response-handler.metaJsonCreativeGrouper (ads/google/a4a/line-delimited-response-handler.js:61); check-package-manager.getNodeLatestLtsVersion(distributionsJson) (build-system/common/check-package-manager.js:173); index.minifyLocalesJsonReviver (build-system/json-locales/index.js:9); index.readJson (build-system/json-locales/index.js:19); list.generateJson (REDACTED:51). Rename to `parseJsonObj`. [rule N6]
D21 · Naming Consistency · `siteID` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `siteID` spells `ID` where 454 names in the project spell it `Id` ads/vendors/ix.js:84 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `siteId`. [rule N6]
D21 · Naming Consistency · `slotID` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `slotID` spells `ID` where 454 names in the project spell it `Id` ads/vendors/ix.js:84 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `slotId`. [rule N6]
D21 · Naming Consistency · `bundleID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `bundleID_` spells `ID` where 454 names in the project spell it `Id` extensions/amp-access-poool/0.1/poool-impl.js:78 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `bundleId_`. [rule N6]
D21 · Naming Consistency · `readerID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `readerID_` spells `ID` where 454 names in the project spell it `Id` extensions/amp-access-poool/0.1/poool-impl.js:81 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `readerId_`. [rule N6]
D21 · Naming Consistency · `itemID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `itemID_` spells `ID` where 454 names in the project spell it `Id` extensions/amp-access-poool/0.1/poool-impl.js:84 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `itemId_`. [rule N6]
D21 · Naming Consistency · `getATConfig_` spells `AT` where 18 names in the project spell it `At` · ×1
  • `getATConfig_` spells `AT` where 18 names in the project spell it `At` extensions/amp-addthis/0.1/amp-addthis.js:365 — 18 of 19 names in project amp-html spell the token `At` (18 of 19; unit: names in project amp-html containing `At`). Peers: amp-task-runner.startAtRepoRoot (build-system/task-runner/amp-task-runner.js:56); VisibilityManager.isBackgroundedAtStart (extensions/amp-analytics/0.1/visibility-manager.js:196); VisibilityManagerForDoc.backgroundedAtStart_ (extensions/amp-analytics/0.1/visibility-manager.js:570); VisibilityManagerForDoc.isBackgroundedAtStart (extensions/amp-analytics/0.1/visibility-manager.js:655); VisibilityManagerForEmbed.backgroundedAtStart_ (extensions/amp-analytics/0.1/visibility-manager.js:854). Rename to `getAtConfig_`. [rule N6]
D21 · Naming Consistency · `generatePixelURL` spells `URL` where 440 names in the project spell it `Url` · ×1
  • `generatePixelURL` spells `URL` where 440 names in the project spell it `Url` extensions/amp-apester-media/0.1/utils.js:192 — 440 of 446 names in project amp-html spell the token `Url` (440 of 446; unit: names in project amp-html containing `Url`). Peers: AbstractAmpContext.canonicalUrl (3p/ampcontext.js:43); AbstractAmpContext.sourceUrl (3p/ampcontext.js:97); recaptcha.initRecaptcha(recaptchaApiBaseUrl) (3p/recaptcha.js:70); handler.getEventualUrl (ads/alp/handler.js:120); url-builder.buildUrl (ads/google/a4a/shared/url-builder.js:15). Rename to `generatePixelUrl`. [rule N6]
D21 · Naming Consistency · `partnerID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `partnerID_` spells `ID` where 454 names in the project spell it `Id` REDACTED:48 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `partnerId_`. [rule N6]
D21 · Naming Consistency · `feedID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `feedID_` spells `ID` where 454 names in the project spell it `Id` REDACTED:51 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `feedId_`. [rule N6]
D21 · Naming Consistency · `playerID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `playerID_` spells `ID` where 454 names in the project spell it `Id` REDACTED:54 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `playerId_`. [rule N6]
D21 · Naming Consistency · `getConsentCID` spells `CID` where 40 names in the project spell it `Cid` · ×1
  • `getConsentCID` spells `CID` where 40 names in the project spell it `Cid` extensions/amp-consent/0.1/consent-config.js:335 — 40 of 41 names in project amp-html spell the token `Cid` (40 of 41; unit: names in project amp-html containing `Cid`). Peers: AmpUserNotification.optoutOfCid_ (extensions/amp-user-notification/0.1/amp-user-notification.js:317); AmpUserNotification.getAsyncCid_ (extensions/amp-user-notification/0.1/amp-user-notification.js:335); AmpUserNotification.getCidService_ (extensions/amp-user-notification/0.1/amp-user-notification.js:358); ad-cid.getAdCid (src/ad-cid.js:13); ad-cid.getOrCreateAdCid (src/ad-cid.js:32). Rename to `getConsentCid`. [rule N6]
D21 · Naming Consistency · `baseURL_` spells `URL` where 440 names in the project spell it `Url` · ×1
  • `baseURL_` spells `URL` where 440 names in the project spell it `Url` REDACTED:89 — 440 of 446 names in project amp-html spell the token `Url` (440 of 446; unit: names in project amp-html containing `Url`). Peers: AbstractAmpContext.canonicalUrl (3p/ampcontext.js:43); AbstractAmpContext.sourceUrl (3p/ampcontext.js:97); recaptcha.initRecaptcha(recaptchaApiBaseUrl) (3p/recaptcha.js:70); handler.getEventualUrl (ads/alp/handler.js:120); url-builder.buildUrl (ads/google/a4a/shared/url-builder.js:15). Rename to `baseUrl_`. [rule N6]
D21 · Naming Consistency · `contentID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `contentID_` spells `ID` where 454 names in the project spell it `Id` REDACTED:92 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `contentId_`. [rule N6]
D21 · Naming Consistency · `isValidAdSenseURL` spells `URL` where 440 names in the project spell it `Url` · ×1
  • `isValidAdSenseURL` spells `URL` where 440 names in the project spell it `Url` extensions/amp-next-page/0.1/config.js:132 — 440 of 446 names in project amp-html spell the token `Url` (440 of 446; unit: names in project amp-html containing `Url`). Peers: AbstractAmpContext.canonicalUrl (3p/ampcontext.js:43); AbstractAmpContext.sourceUrl (3p/ampcontext.js:97); recaptcha.initRecaptcha(recaptchaApiBaseUrl) (3p/recaptcha.js:70); handler.getEventualUrl (ads/alp/handler.js:120); url-builder.buildUrl (ads/google/a4a/shared/url-builder.js:15). Rename to `isValidAdSenseUrl`. [rule N6]
D21 · Naming Consistency · `fromURL` spells `URL` where 440 names in the project spell it `Url` · ×1
  • `fromURL` spells `URL` where 440 names in the project spell it `Url` extensions/amp-next-page/0.1/next-page-service.js:588 — 440 of 446 names in project amp-html spell the token `Url` (440 of 446; unit: names in project amp-html containing `Url`). Peers: AbstractAmpContext.canonicalUrl (3p/ampcontext.js:43); AbstractAmpContext.sourceUrl (3p/ampcontext.js:97); recaptcha.initRecaptcha(recaptchaApiBaseUrl) (3p/recaptcha.js:70); handler.getEventualUrl (ads/alp/handler.js:120); url-builder.buildUrl (ads/google/a4a/shared/url-builder.js:15). Rename to `fromUrl`. [rule N6]
D21 · Naming Consistency · `toURL` spells `URL` where 440 names in the project spell it `Url` · ×1
  • `toURL` spells `URL` where 440 names in the project spell it `Url` extensions/amp-next-page/0.1/next-page-service.js:588 — 440 of 446 names in project amp-html spell the token `Url` (440 of 446; unit: names in project amp-html containing `Url`). Peers: AbstractAmpContext.canonicalUrl (3p/ampcontext.js:43); AbstractAmpContext.sourceUrl (3p/ampcontext.js:97); recaptcha.initRecaptcha(recaptchaApiBaseUrl) (3p/recaptcha.js:70); handler.getEventualUrl (ads/alp/handler.js:120); url-builder.buildUrl (ads/google/a4a/shared/url-builder.js:15). Rename to `toUrl`. [rule N6]
D21 · Naming Consistency · `publisherID_` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `publisherID_` spells `ID` where 454 names in the project spell it `Id` extensions/amp-smartlinks/0.1/linkmate.js:24 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `publisherId_`. [rule N6]
D21 · Naming Consistency · `InvalidID` spells `ID` where 454 names in the project spell it `Id` · ×1
  • `InvalidID` spells `ID` where 454 names in the project spell it `Id` src/bento/components/bento-imgur/1.0/storybook/Basic.js:30 — 454 of 465 names in project amp-html spell the token `Id` (454 of 465; unit: names in project amp-html containing `Id`). Peers: 3p.computeInMasterFrame(taskId) (3p/3p.js:172); 3p.isExperimentOn(experimentId) (3p/3p.js:296); IntegrationAmpContext.reportRenderedEntityIdentifier(entityId) (3p/ampcontext-integration.js:114); IntegrationAmpContext.computeInMasterFrame(taskId) (3p/ampcontext-integration.js:133); AbstractAmpContext.clientId (3p/ampcontext.js:46). Rename to `InvalidId`. [rule N6]
D21 · Naming Consistency · `setupAMPCors` spells `AMP` where 188 names in the project spell it `Amp` · ×1
  • `setupAMPCors` spells `AMP` where 188 names in the project spell it `Amp` src/utils/xhr-utils.js:285 — 188 of 192 names in project amp-html spell the token `Amp` (188 of 192; unit: names in project amp-html containing `Amp`). Peers: GltfViewer.toggleAmpPlay_ (3p/3d-gltf/viewer.js:262); GltfViewer.toggleAmpViewport_ (3p/3d-gltf/viewer.js:270); 3p.ampcontext-integration.IntegrationAmpContext (3p/ampcontext-integration.js:36); 3p.ampcontext.AbstractAmpContext (3p/ampcontext.js:14); frame-metadata.getAmpConfig (3p/frame-metadata.js:62). Rename to `setupAmpCors`. [rule N6]
D21 · Naming Consistency · `generateAMPConfigObject` spells `AMP` where 188 names in the project spell it `Amp` · ×1
  • `generateAMPConfigObject` spells `AMP` where 188 names in the project spell it `Amp` test/unit/test-amp-context.js:396 — 188 of 192 names in project amp-html spell the token `Amp` (188 of 192; unit: names in project amp-html containing `Amp`). Peers: GltfViewer.toggleAmpPlay_ (3p/3d-gltf/viewer.js:262); GltfViewer.toggleAmpViewport_ (3p/3d-gltf/viewer.js:270); 3p.ampcontext-integration.IntegrationAmpContext (3p/ampcontext-integration.js:36); 3p.ampcontext.AbstractAmpContext (3p/ampcontext.js:14); frame-metadata.getAmpConfig (3p/frame-metadata.js:62). Rename to `generateAmpConfigObject`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 895 of 917 significant files have no living knowledge, while the repository is still being changed at a low rate (4 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 895 separate risks. Counted over 917 of the 1745 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
IC1 · Incompleteness & stubs · Empty method body · ×1
  • Empty method body ads/vendors/adventive.js:22 — `addInstance` has an empty body — confirm it's an intentional no-op and not an unfinished method.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 3/13 async functions that make a cancellable request (fetch, axios, ky, ofetch, got, undici, node:http) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) override strict null checking · ×1
  • Null assertions (`!`) override strict null checking — ~5.3 `!` null assertions per 1k TypeScript source lines — 26 assertion(s) across the 4947 source line(s) of the 61 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: src/bento/components/bento-autocomplete/1.0/component/component.tsx (7), extensions/amp-pan-zoom/1.0/component-ts.tsx (4), extensions/amp-date-picker/1.0/component/date-range-picker.tsx (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex REDACTED:676 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
Minor — 33 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×18
  • Outdated (npm): @polymer/polymer — @polymer/polymer is pinned at 1.2.5-npm-test.2; registry.npmjs.org publishes 3.5.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @use-gesture/react — @use-gesture/react is pinned at 10.2.10; registry.npmjs.org publishes 10.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): @webcomponents/webcomponentsjs — @webcomponents/webcomponentsjs is pinned at 2.6.0; registry.npmjs.org publishes 2.8.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): codemirror — codemirror is pinned at 5.58.2; registry.npmjs.org publishes 6.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): date-fns — date-fns is pinned at 2.27.0; registry.npmjs.org publishes 4.4.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): dompurify — dompurify is pinned at 3.0.2; registry.npmjs.org publishes 3.4.18 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): intersection-observer — intersection-observer is pinned at 0.12.0; registry.npmjs.org publishes 0.12.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): jss — jss is pinned at 10.8.2; registry.npmjs.org publishes 10.10.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): jss-preset-default — jss-preset-default is pinned at 10.8.2; registry.npmjs.org publishes 10.10.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): moment — moment is pinned at 2.29.4; registry.npmjs.org publishes 2.31.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): preact — preact is pinned at 10.16.0; registry.npmjs.org publishes 11.2.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react-day-picker — react-day-picker is pinned at 8.0.0-beta.37; registry.npmjs.org publishes 10.0.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): react-jss — react-jss is pinned at 10.8.2; registry.npmjs.org publishes 10.10.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): rrule — rrule is pinned at 2.7.2; registry.npmjs.org publishes 2.8.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): through2 — through2 is pinned at 4.0.2; registry.npmjs.org publishes 5.0.12 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): timeago.js — timeago.js is pinned at 4.0.2; registry.npmjs.org publishes 4.3.1 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): vulcanize — vulcanize is pinned at 1.14.12; registry.npmjs.org publishes 1.16.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): webcomponents.js — webcomponents.js is pinned at 0.7.22; registry.npmjs.org publishes 0.7.24 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
D10 · Test Quality · Skipped (documented) · ×12
  • Skipped (documented): should propagate errors out and report them to upstream error log extensions/amp-a4a/0.1/test/test-a4a-integration.js:215 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/input.mjs:22 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/isenumvalue/output.mjs:24 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/enumvalues/input.mjs:22 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-inline-isenumvalue/test/fixtures/transform-assertions/enumvalues/output.mjs:17 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/input.js:6 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-html-template/test/fixtures/transform-assertions/other-template-literals/output.js:7 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-default-assignment/test/fixtures/transform-assertions/throws-on-param-assignment-with-destructure/input.js:1 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-default-assignment/test/fixtures/transform-assertions/should-transform-param/input.js:1 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-default-assignment/test/fixtures/transform-assertions/should-transform-param/input.js:6 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-default-assignment/test/fixtures/transform-assertions/should-transform-param/output.js:1 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
  • Skipped (documented): (unnamed test) build-system/babel-plugins/babel-plugin-transform-default-assignment/test/fixtures/transform-assertions/should-transform-param/output.js:7 — Skipped with a documented reason — a deferral, not lazy debt: declared with no body — a pending test the runner lists but never runs
D24 · Comment Value · doc comments repeat the names · ×3
  • doc comments repeat the names build-system/tasks/e2e/selenium-webdriver-controller.js:682 — 0 of 3 documented parameters and 1 of 62 summaries in `amp-e2e` only repeat the member or parameter name (e.g. "Get the current root" for `getRoot_`). Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names 3p/3p.js:301 — 33 of 1739 documented parameters and 194 of 7302 summaries in `amp-html` only repeat the member or parameter name (e.g. "Set experiment toggles." for `setExperimentToggles`). 10 documentation tag(s) are empty. Delete the restating tags, or add what the name does not say.
  • doc comments repeat the names REDACTED:144 — 0 of 38 documented parameters and 1 of 29 summaries in `amp-visual-diff` only repeat the member or parameter name (e.g. "Launches a Percy agent instance." for `launchPercyAgent`). Delete the restating tags, or add what the name does not say.

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.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d5d645d45afe4e0f9f6e0654de622a51/history.json --exit-code 0 --source .4artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-d5d645d45afe4e0f9f6e0654de622a51/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude build-system/tasks/make-extension/template/classic/examples --exclude build-system/tasks/make-extension/template/classic/extensions/amp-__component_name_hyphenated__/__component_version__ --exclude build-system/tasks/make-extension/template/css --exclude build-system/tasks/make-extension/template/jss --exclude build-system/tasks/make-extension/template/shared/extensions/amp-__component_name_hyphenated__/__component_version__ --exclude extensions/amp-a4a/0.1/test/testdata --exclude third_party/amp-toolbox-cache-url/dist --exclude third_party/moment --exclude third_party/web-animations-externs --exclude validator/js/chromeextension/_locales --exclude validator/js/engine --exclude validator/js/gulpjs/sample --exclude validator/js/gulpjs/test --exclude validator/js/nodejs --exclude validator/js/webui/@polymer .306artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .137artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—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 10 file(s) — `extensions/amp-story-auto-ads/0.1/_locales/index.js`, `extensions/amp-story-auto-ads/0.1/story-ad-localization.js`, `extensions/amp-story-interactive/0.1/interactive-disclaimer.js`, `extensions/amp-story-shopping/0.1/amp-story-shopping-config.js`, `extensions/amp-story/1.0/_locales/index.js`, … (+5 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—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.0—
D41 · Kernel & Syscall Confinementruntime-hardening—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.0—
D42 · Runtime Threat Enforcementruntime-hardening—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.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1dda7-e4fa-7197-892f-c734064d61ad · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

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.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md