Code reference detail
check.test.ts
reqlan rq/core_analysis/packages/cli/test/check.test.ts
| 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_order_by_target | done | [check] returns issues ordered by the missing [reference] target, not by the source file. Rows that share the same missing idea, comment target, file path, or import target stay together so you can see every site that points at one missing thing. Inside a target group, order by kind, then source file, then line. JSON and pipe keep a flat list in that order. Terminal output uses one heading per missing target. Related: [check] ["../cli/cli_package.rq".commands] | 0.370 | |
| 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_unresolved_imports | done | [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.425 | |
| 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_sparse | done | A ["../reference_types.rq".wildcard_reference] is for many matches. [check] recounts each wildcard against the full idea catalog, not the stored edges, so files that the indexer visited first still get the true match count. How 0 - match and 1 - match rows are handled is controlled by [check_wildcard_zero] and [check_wildcard_one] ( both default `warn` ). Ignore a site with [comment_reference_ignore]. The language server already warns when a wildcard matches nothing ( ["../language/imports.rq".wildcard_references] ); it also warns when the match count is 1. Related: [check] ["../language/imports.rq".wildcard_references] | 0.417 | |
| 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 |
Reference labels
check, check_glob_patterns, check_order_by_target, check_skip_gitignored_targets, check_skip_targets, check_unresolved_imports, check_wildcard_one, check_wildcard_sparse, check_wildcard_zero