Referenced by5
Labels2

Referencing ideas

IdeaStatusTagsSummaryKatz
check_unresolved_importsdone[check] reports an error when an import does not resolve. A missing import path is an error. A named imported idea that is not in the target file is an error. Do not report imported idea names when the path is missing. An existing folder is a valid import path ( [import_folder_targets] ). A remote URL is not a missing path. Import paths with no extension mean `.rq` first ( [implicit_file_extension] ). Ignore a site with [comment_reference_ignore]. Issue kind is `import`. The `label` is the missing path or the missing idea name. Forms: [import_from], [import_namespace], [import_qualified]. Editor underline: [import_does_not_exist_error]. [check_skip_targets] matches that label. [check_skip_gitignored_targets] omits a missing import path that Git ignore rules ignore. Related: [check] [check_order_by_target] [import_does_not_exist_error]0.415
check_unused_importsin-progress`check_references` reports an unused import when the import path resolves, the named idea exists, and the bound name produced by the import specifier or import alias is never referenced in the file body ( no `Local` reference to the bound name, no `Qualified` reference with qualifier = alias, no `IdeaSet` member with that name ). Issue kind is `unused_import`. Severity defaults to `warning` ( controlled by `unusedImports`: `"warn"` | `"error"` | `"off"`, default `"warn"` ). CLI flag: `--unused-imports <warn|error|off>`. Per-file `unusedImports` is read from `.reqlan/config.json` for the source file ' s applying base. Suppressed when the preceding line is `//rq-ignore-error`. Related: [check], [check_unresolved_imports], ["../language/imports.rq".unused_imports], ["../extension/host/configuration.rq".configuration_import_roots].0.163
import_does_not_exist_errorImports show an underline error when the target file or folder does not exist. Imports also show an underline error when a named imported idea does not exist in the target file. An existing folder is not an error: [import_folder_targets]. CI: ["../../../core_analysis/check.rq".check_unresolved_imports]. [general_errors]0.145
unused_import_diagnosticsin-progressUnused import bindings are detected per-file: every specifier of `from "path" import a, b`, every alias of `import "path" as ns`, and every bound name of `import "path".ideaset.idea [as alias]` is checked against all `Local` references ( `[name]` / `[[name]]` or `[qualifier.idea]` where qualifier matches the alias ) and `IdeaSet` members. If the config is `"warn"` ( default ), each unused specifier emits a `warning` diagnostic with `DiagnosticTag.Unnecessary`; `"error"` emits `error`; `"off"` suppresses the diagnostic entirely. The `reqlan.check` CLI accepts `--unused-imports <warn|error|off>`; per-file `.reqlan/config.json` `unusedImports` setting applies per source file ' s base. Lines after `//rq-ignore-error` suppress this diagnostic, matching ["../../../language/syntax.rq".comment_reference_ignore]. In the editor, emit `DiagnosticSeverity.Warning` or `Error` with code `"unused-import"` and tag `Unnecessary`. Provide a Quick Fix that removes the specifier ( with its comma ) from `from` imports or the entire import line for namespace / qualified / bare imports. Related: ["../../../language/imports.rq".import_tokenisation], ["../../../language/imports.rq".anonymous_imports_allowed], [import_does_not_exist_error], ["../../host/configuration.rq".configuration_import_roots].0.036
unused_importsin-progressAn import binding that is never referenced by any local reference in the importing file is unused. A `from "path" import idea` binds `idea`; a `from "path" import idea as alias` binds `alias`; `import "path" as ns` binds `ns`; `import "path".ideaset.idea [as alias]` binds `alias` or `idea`; a bare `import "path"` ( no `as` ) binds nothing and is always unused since anonymous references ( `["path".idea]` ) never need it. Used names are those that appear as `Local` ( `[name]` / `[[name]]` or `[qualifier.idea]` with qualifier = alias ) or as `IdeaSet` members ( `ideaset foo { member1, member2 }` ). The severity is configurable per `.reqlan/config.json` ( `unusedImports`: `"warn"` | `"error"` | `"off"`, default `"warn"` ) and via VS Code setting `reqlan.unusedImports`. The `reqlan.check` CLI accepts `--unused-imports <warn|error|off>`, overriding the config for that run. When set to `warn`, emit `warning`; when `error`, emit `error`; when `off`, suppress the diagnostic entirely. Lines preceded by `//rq-ignore-error` suppress the unused import diagnostic, matching ["./syntax.rq".comment_reference_ignore]. Editor: emit `DiagnosticTag.Unnecessary` so VS Code dims / fades the line; provide a Quick Fix ( `Remove unused import` ) that removes the specifier ( with its comma ) for `from` imports or the entire import line for namespace / qualified / bare imports. Related: [import_tokenisation], [anonymous_imports_allowed], ["../extension/language/support/features-imports.rq".import_does_not_exist_error], ["../extension/host/configuration.rq".configuration_import_roots].0.057

Reference labels

"../../../../crates/reqlan-index/src/check/imports.rs", "../../crates/reqlan-index/src/check/imports.rs"