github / github/codeql-cli-binaries

codeql run test doesn't match absolute fs paths in graph queries

Open
#36 3 comments 0 reactions 0 assignees View on GitHub
CLI
Dominant language
No language data
Stars
1k
Forks
184
PR merge metrics
No merged PRs in 30d

Description

Per @max-schaefer `codeql run test` should adapt queries that emit absolute FS paths such that they pass when run in a different environment. For example my test emits `# 0| [File] /home/chris/codeql-home/codeql-go/ql/test/library-tests/semmle/go/PrintAst/input.go` but the test doesn't work when the `.expected` file uses a truncated relative version of that path, or when it uses a different absolute path and the .actual uses the absolute path appropriate to a different environment.

Contributor guide

Open the contributing guide

Research direction

Begin at the `codeql run test` entry point and reproduce the absolute-path mismatch described in the issue. Determine how expected and actual output should be normalized across environments; done means the example passes with relative or differing absolute paths while preserving other output comparisons.

Written by the indexing model from the issue text.

Assessment

Domain
cli, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.