Code reference detail
broken_references.rs
reqlan rq/core_analysis/crates/reqlan-analytical/tests/broken_references.rs
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| check | done | `reqlan check` should run perform the following checks: - ensure all rq [reference] point to real nodes, unless rq ignored with [comment_reference_ignore]. - this tests rqcomments point to real parts of the namespace, that code references exist, and that rq references exists. - report unresolved imports: [check_unresolved_imports]. - report a comment reference with invalid syntax: [code_comment_syntax_errors]. - report a qualified reference whose file is not on disk: [check_qualified_missing_file]. - report a qualified reference whose `.rq` file does not declare the idea: [check_qualified_missing_idea]. - it should really just be a wrapper of the [index] and return the issues ( as a pipe, terminal output, or json ). Issue order: [check_order_by_target]. Sparse wildcards: [check_wildcard_sparse] via flags [check_wildcard_zero] and [check_wildcard_one]. Path globs: [check_glob_patterns]. Skip missing targets: [check_skip_targets] [check_skip_gitignored_targets]. CLI: ["../cli/cli_package.rq".commands]. MCP: ["../extension/agent/skills-and-mcp.rq".mcp_check]. CI: [check_meta_implementation]. Site demo: ["../site/site.rq".broken_links_showcase]. | 1.000 | |
| check_glob_patterns | done | [check] accepts more than one `--glob` pattern. Repeat `--glob` for each pattern. A file is in the recursive scan when it matches any glob. One `--glob` selects the same files as one path glob. A reference target that matches no glob is still checked. That target must resolve. [check] does not walk a directory that matches no glob. A positional path can name a file outside the globs. [check] checks that file. A positional path that is a directory outside the globs is not walked. An empty `--glob` value is an error. API: `AnalysisApi.check({ pathGlobs, paths })`. CLI: ["../cli/cli_package.rq".commands]. MCP: ["../extension/agent/skills-and-mcp.rq".mcp_check]. Related: [check] | 0.308 | |
| check_skip_gitignored_targets | done | [check] omits a file [reference] issue when Git ignore rules ignore the missing target. The analyser function `check_references` takes `skip_gitignored_targets` ( default false ). Match uses the workspace ["../../.gitignore"] and nested `.gitignore` files on the target path. Match uses the resolved path from the workspace root, not the authored path in the source file. Idea references, comment references, and missing imported idea names stay in the issue list. Missing import paths follow the same skip as file references ( [check_unresolved_imports] ). Use this when a referenced file is build output or editor config that git does not store. Examples: `.cursor/` for ["../extension/agent/chat-participant.rq".mcp], and `packages/extension/media/webviews/` for ["../extension/host/onboarding/page-thanks-for-installing.rq".installation_event]. CLI: `--skip-gitignored-targets` ( ["../cli/cli_package.rq".commands] ). API: `AnalysisApi.check({ skipGitignoredTargets })`. CI: ["../../.github/workflows/ci.yml"] and ["../../azure-pipelines.yml"] pass `--skip-gitignored-targets` because a CI checkout does not contain gitignored files ( [check_meta_implementation] ). Related: [check] [check_skip_targets] [check_unresolved_imports] [check_meta_implementation] | 0.445 | |
| check_skip_targets | done | [check] omits an issue when the missing [reference] target matches a skip glob. The analyser function `check_references` takes `skip_targets`: a list of globs. Match uses the same path glob rules as `--glob`. Match is against the issue `label` ( the missing target ), not the source file. An empty skip glob has no effect. Use this when a referenced file is not in git and you name the skip glob. For all Git ignore rules, use [check_skip_gitignored_targets]. CLI: repeatable `--skip-target <glob>` ( ["../cli/cli_package.rq".commands] ). API: `AnalysisApi.check({ skipTargets })`. Related: [check] [check_skip_gitignored_targets] [check_meta_implementation] | 0.445 | |
| check_wildcard_one | done | `check_references` flag `wildcard_one` ( default `warn` ) controls a ["../reference_types.rq".wildcard_reference] that matches exactly 1 idea. 1 match means the pattern is too narrow — use a concrete [reference] instead. `warn` — emit the row with severity `warning` and match count 1. `error` — emit the row with severity `error` and match count 1. `off` — omit the row. CLI: `--wildcard-one <warn|error|off>` ( ["../cli/cli_package.rq".commands] ). API: `AnalysisApi.check({ wildcardOne })`. Related: [check] [check_wildcard_sparse] [check_wildcard_zero] ["../language/imports.rq".wildcard_references] | 0.507 | |
| check_wildcard_zero | done | `check_references` flag `wildcard_zero` ( default `warn` ) controls a ["../reference_types.rq".wildcard_reference] that matches 0 ideas. 0 matches means the pattern hits nothing. `warn` — emit the row with severity `warning` and match count 0. `error` — emit the row with severity `error` and match count 0. `off` — omit the row. CLI: `--wildcard-zero <warn|error|off>` ( ["../cli/cli_package.rq".commands] ). API: `AnalysisApi.check({ wildcardZero })`. Related: [check] [check_wildcard_sparse] [check_wildcard_one] | 0.507 | |
| test_references | done | The indexer lists broken references in a [index] base. A broken reference is an unresolved idea or wildcard reference. You can give an optional path glob so that the list covers only a subset of the base. You can optionally include unresolved [comment_reference] sites. The function is in the core analysis module. The CLI exposes it on [commands] ( `analyse --broken-refs` ). Related: [analysers] [runtime] [indexer.index_code_files] ["../language/syntax.rq".comment_reference_resolution_error] | 0.201 |
Reference labels
check, check_glob_patterns, check_skip_gitignored_targets, check_skip_targets, check_wildcard_one, check_wildcard_zero, test_references