github / github/codeql

Java: Extractor succeeds despite semmle-extractor-options using invalid `-source` or `-target` values

Offen
#5,648 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug Java
Vorherrschende Sprache
CodeQL
Sterne
10.1k
Forks
2.1k
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
141

Beschreibung

### Version
CodeQL CLI 2.5.0

### Description of the issue
Possibly related to #5594

When using `codeql test run` and an `options` file containing `semmle-extractor-options` with `-source` or `-target` with an invalid value (e.g. `-source 2`; apparently `javac` expects `-source 1.2`) the extractor succeeds despite `javac` reporting errors.

Note that this does not apply to other incorrect argument usage, such as specifying both `--source` and `--release` or using the correct version notation, e.g. `-source 1.2`. In that case the extractor fails, as expected.

### Reproduction steps
1. Create a query test file and a Java source file (content does not matter)
2. Create an `options` file containing:
```
//semmle-extractor-options: --javac-args -source 2
```
3. Run `codeql test run --keep-databases`
:x: The test succeeds (or fails on `RESULT` stage)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.