Files
codeql/python/extractor/cli-integration-test
Paolo Tranquilli d28792537b Python extractor: use relative paths in diagnostic locations
Diagnostic `Location.file` fields contained absolute filesystem paths,
causing the GitHub UI to generate broken file links with runner paths
like `/home/runner/work/...`. Now paths are relativized against the
source root (`LGTM_SRC` or cwd), falling back to absolute if the file
is outside the source root.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-13 10:32:05 +02:00
..
2025-05-15 14:53:15 +00:00

Extractor Python CodeQL CLI integration tests

To ensure that the two work together as intended, and as an easy way to set up realistic test-cases.

Adding a new test case

Add a new folder, place a file called test.sh in it, which should start with the code below. The script should exit with failure code to fail the test.

#!/bin/bash

set -Eeuo pipefail # see https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/

set -x

CODEQL=${CODEQL:-codeql}

SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
cd "$SCRIPTDIR"