Repository Analysis

xtermjs/xterm.js

A terminal for the web

2.0 Likely human-written View on GitHub
2.0
Adjusted Score
2.0
Raw Score
100%
Time Factor
2026-05-28
Last Push
20,638
Stars
TypeScript
Language
104,634
Lines of Code
476
Files
89
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 9HIGH 2MEDIUM 2LOW 76

Pattern Findings

89 matches across 9 categories. Click a row to expand file-level details.

Hallucination Indicators9 hits · 110 pts
SeverityFileLineSnippet
CRITICALaddons/addon-image/test/ImageAddon.test.ts120 strictEqual(await ctx.page.evaluate('window.term._core.buffer.lines.get(0)._data instanceof Uint32Array'), true);
CRITICALaddons/addon-image/test/ImageAddon.test.ts121 strictEqual(await ctx.page.evaluate('window.term._core.buffer.lines.get(0)._extendedAttrs instanceof Object'), true)
CRITICALaddons/addon-image/src/ImageStorage.ts278 this._terminal._core._inputHandler._dirtyRowTracker.markDirty(buffer.y);
CRITICALaddons/addon-image/src/ImageStorage.ts293 this._terminal._core._inputHandler._dirtyRowTracker.markDirty(buffer.y);
CRITICALaddons/addon-ligatures/src/fontLigatures/index.ts31 const caltFeatures = this._font.tables.gsub && this._font.tables.gsub.features.filter((f: { tag: string }) => f.tag
CRITICALsrc/browser/CoreBrowserTerminal.ts1143 const canvasWidth = this._renderService.dimensions.css.canvas.width.toFixed(0);
CRITICALsrc/browser/CoreBrowserTerminal.ts1144 const canvasHeight = this._renderService.dimensions.css.canvas.height.toFixed(0);
CRITICALsrc/browser/CoreBrowserTerminal.ts1148 const cellWidth = this._renderService.dimensions.css.cell.width.toFixed(0);
CRITICALsrc/browser/CoreBrowserTerminal.ts1149 const cellHeight = this._renderService.dimensions.css.cell.height.toFixed(0);
Hyper-Verbose Identifiers34 hits · 34 pts
SeverityFileLineSnippet
LOWdemo/client/client.ts442function updateTerminalContainerBackground(): void {
LOWdemo/client/components/window/testWindow.ts322function customGlyphAlignmentHandler(term: Terminal): void {
LOWtest/benchmark/DecorationService.benchmark.ts18function registerSingleLineDecorations(service: DecorationService, bufferService: MockBufferService, count: number): voi
LOWtest/playwright/SharedRendererTests.ts17export function injectSharedRendererTests(ctx: ISharedRendererTestContext): void {
LOWtest/playwright/SharedRendererTests.ts1444async function getCellDomBackgroundColor(ctx: ITestContext, col: number, row: number): Promise<[number, number, number,
LOWtest/playwright/SharedRendererTests.ts1449async function getCellDomForegroundColor(ctx: ITestContext, col: number, row: number): Promise<[number, number, number,
LOWtest/playwright/SharedRendererTests.ts1469export function injectSharedRendererTestsStandalone(ctx: ISharedRendererTestContext, setupCb: () => Promise<void> | void
LOWaddons/addon-webgl/src/GlyphRenderer.ts59function createFragmentShaderSource(maxFragmentShaderTextureUnits: number): string {
LOWaddons/addon-webgl/src/TextureAtlas.ts1152function checkCompletelyTransparent(imageData: ImageData): boolean {
LOWaddons/addon-webgl/src/DevicePixelObserver.ts8export function observeDevicePixelDimensions(element: HTMLElement, parentWindow: Window & typeof globalThis, callback: (
LOW…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts173function drawPathDefinitionCharacter(
LOW…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts382function drawPathNegativeDefinitionCharacter(
LOW…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts508function drawPathFunctionCharacter(
LOWaddons/addon-web-links/test/WebLinksAddon.test.ts165async function resetAndHover(col: number, row: number): Promise<void> {
LOW…addon-ligatures/src/fontLigatures/processors/helper.ts151function getSubstitutionAtPositionRange(substitutions: ISubstitutionLookupRecord[], lookups: Lookup[], index: number, ra
LOW…addon-ligatures/src/fontLigatures/processors/helper.ts168function getSubstitutionAtPosition(substitutions: ISubstitutionLookupRecord[], lookups: Lookup[], index: number, glyphId
LOW…ligatures/src/fontLigatures/processors/substitution.ts12export function getRangeSubstitutionGlyphs(table: SubstitutionTable, glyphId: [number, number]): Map<[number, number] |
LOW…ligatures/src/fontLigatures/processors/substitution.ts41export function getIndividualSubstitutionGlyph(table: SubstitutionTable, glyphId: number): number | null {
LOWsrc/browser/Dom.ts56export function addStandardDisposableListener(node: HTMLElement, type: string, handler: (event: any) => void, useCapture
LOWsrc/browser/Dom.ts154export function scheduleAtNextAnimationFrame(targetWindow: Window, runner: () => void, priority: number = 0): IDisposabl
LOWsrc/browser/Clipboard.ts66export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextAreaElement, screenElement: HTMLElement):
LOWsrc/browser/renderer/shared/RendererUtils.ts22export function isRestrictedPowerlineGlyph(codepoint: number): boolean {
LOWsrc/browser/renderer/shared/RendererUtils.ts63export function treatGlyphAsBackgroundColor(codepoint: number): boolean {
LOWsrc/browser/renderer/shared/SelectionRenderModel.ts91export function createSelectionRenderModel(): ISelectionRenderModel {
LOWsrc/browser/input/Mouse.ts6export function getCoordsRelativeToElement(window: Pick<Window, 'getComputedStyle'>, event: {clientX: number, clientY: n
LOWsrc/browser/scrollable/mouseEvent.ts15function getParentWindowIfSameOrigin(w: Window): Window | null {
LOWsrc/browser/services/MouseService.test.ts63function createTestMouseTargetElement(): HTMLElement {
LOWsrc/common/WindowsMode.ts9export function updateWindowsModeWrappedState(bufferService: IBufferService): void {
LOWsrc/common/input/Keyboard.test.ts10function testEvaluateKeyboardEvent(partialEvent: {
LOWsrc/common/buffer/BufferReflow.ts25export function reflowLargerGetLinesToRemove(lines: CircularList<IBufferLine>, oldCols: number, newCols: number, bufferA
LOWsrc/common/buffer/BufferReflow.ts116export function reflowLargerCreateNewLayout(lines: CircularList<IBufferLine>, toRemove: number[]): INewLayoutResult {
LOWsrc/common/buffer/BufferReflow.ts151export function reflowLargerApplyNewLayout(lines: CircularList<IBufferLine>, newLayout: number[]): void {
LOWsrc/common/buffer/BufferReflow.ts179export function reflowSmallerGetNewLineLengths(wrappedLines: BufferLine[], oldCols: number, newCols: number): number[] {
LOWsrc/common/buffer/BufferReflow.ts215export function getWrappedLineTrimmedLength(lines: BufferLine[], i: number, cols: number): number {
Over-Commented Block24 hits · 24 pts
SeverityFileLineSnippet
LOWdemo/client/components/window/addonImageWindow.ts181
LOWtest/playwright/MouseTracking.test.ts241 // await getReports(encoding); // clear reports
LOWtest/playwright/MouseTracking.test.ts361 await pollFor(ctx.page, () => getReports(encoding), [{ col: 44, row: 25, state: { action: 'press', button: 'left',
LOWtest/playwright/MouseTracking.test.ts561 { col: 44, row: 25, state: { action: 'press', button: 'left', modifier: { control: false, shift: false, meta: tr
LOWtest/playwright/MouseTracking.test.ts581 // // } else {
LOWtest/playwright/MouseTracking.test.ts721 // note: press/release caught by selection manager
LOWtest/playwright/MouseTracking.test.ts881 { col: 44, row: 25, state: { action: 'press', button: 'left', modifier: { control: false, shift: false, meta: tr
LOWtest/playwright/MouseTracking.test.ts901 // } else {
LOWtest/playwright/MouseTracking.test.ts1041 { col: 44, row: 25, state: { action: 'press', button: 'left', modifier: { control: false, shift: false, meta: tr
LOWtest/playwright/MouseTracking.test.ts1061 // } else {
LOWtest/playwright/MouseTracking.test.ts1221 // await mouseMove(44, 24);
LOWtest/playwright/MouseTracking.test.ts1381 // SHIFT
LOWaddons/addon-image/fixture/gcrglf.sh41# (Sixel Display Mode). They control the same thing, so when DECSDM is
LOWaddons/addon-image/fixture/textcursor.sh1#!/bin/bash
LOWaddons/addon-image/fixture/textcursor.sh21# then, the text will overlap the image when a>b.
LOWaddons/addon-image/fixture/textcursor.sh41# will potentially overlap the last row of sixels!
LOWaddons/addon-webgl/src/WebglRenderer.ts641 // Calculate the device character height. Height is ceiled in case devicePixelRatio is a
LOWaddons/addon-webgl/src/WebglRenderer.ts661
LOW…addon-webgl/src/customGlyphs/CustomGlyphDefinitions.ts281 //
LOWaddons/addon-web-links/src/WebLinksAddon.ts1/**
LOW…ddon-unicode-graphemes/src/third-party/unicode-trie.ts41
LOWsrc/common/InputHandler.ts301 // 11 - Change VT100 text background color to Pt.
LOWsrc/common/parser/EscapeSequenceParser.ts21// @vt: #Y ESC ST "String Terminator" "ESC \" "Terminator used for string type sequences."
LOWsrc/common/buffer/Buffer.test.ts861 beforeEach(() => {
Fake / Example Data12 hits · 12 pts
SeverityFileLineSnippet
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts259 const data = '\x1b]0;Lorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts259 const data = '\x1b]0;Lorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts289 const data = '\x1b]1;Lorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts289 const data = '\x1b]1;Lorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts319 const data = '\x1bPpLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts319 const data = '\x1bPpLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts349 const data = '\x1bPqLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts349 const data = '\x1bPqLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts379 const data = '\x1b_XLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts379 const data = '\x1b_XLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts409 const data = '\x1b_YLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
LOWtest/benchmark/EscapeSequenceParser.benchmark.ts409 const data = '\x1b_YLorem ipsum dolor sit amet, consetetur sadipscing elitr.\x1b\\';
Cross-Language Confusion (JS/TS)2 hits · 10 pts
SeverityFileLineSnippet
HIGHsrc/common/Types.ts474 print(data: Uint32Array, start: number, end: number): void;
HIGHsrc/common/parser/EscapeSequenceParser.test.ts122 print(data: Uint32Array, start: number, end: number): void {
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippet
LOW…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts316 // Step 1: Compute (x1', y1')
LOW…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts322 // Step 2: Compute (cx', cy')
LOW…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts344 // Step 3: Compute (cx, cy) from (cx', cy')
LOW…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts348 // Step 4: Compute angles
AI Slop Vocabulary2 hits · 4 pts
SeverityFileLineSnippet
LOWaddons/addon-image/fixture/textcursor.sh138 # color, so remove the color definition and just use the defaults.
MEDIUM…/addon-webgl/src/customGlyphs/CustomGlyphRasterizer.ts495 // Apply pattern offset to ensure seamless tiling across cells when cell dimensions are odd.
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMbin/update-website.sh30 # Create a PR in the GitHub repo
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWbin/vs_base_find_unused.js40// Example usage