← 返回
未分类 中文

Missing Imports

Code uses a symbol that isn't imported, or imports a symbol that doesn't exist in the source module.
代码使用了未导入的符号,或导入了源模块中不存在的符号。
mvogt99 mvogt99 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 292
下载
💾 1
安装
1
版本
#latest

概述

missing-imports

The generated code uses a name that hasn't been brought into scope, or imports from a module that doesn't export the named symbol. A guaranteed runtime NameError / ReferenceError / ImportError.

Symptoms

  • Code uses Foo but Foo is never imported.
  • from mod import X where mod exists but does not export X.
  • import { x } from "pkg" with no matching named export.
  • Static analysis flags unused-import alongside undefined-name — common when the agent copy-pastes between files.

What to do

  • For every symbol used in the diff, confirm there is a corresponding import in the same file or that the symbol is defined locally.
  • For every new import, verify the target module actually exports that name. Open the module if needed.
  • Don't guess at package layout. When unsure, read the package's package.json exports, __init__.py, or equivalent.
  • Run the static checker (tsc, mypy, pyright, etc.) after every non-trivial change. Missing imports almost always surface there.
  • Remove unused imports in the same change so the surface stays honest — stale imports mask real failures.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-08 00:50 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 329,515
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 197 📥 67,971
data-analysis

Analysis Missing Tradeoffs

mvogt99
分析仅呈现单一选项,未比较替代方案,也未说明所选方案的成本。
★ 0 📥 671