github / github/codeql-cli-binaries
The output location should both be a directory and not be directory
- Dominant language
- No language data
- Stars
- 1k
- Forks
- 184
- PR merge metrics
- No merged PRs in 30d
Description
```console
> mkdir out
> codeql query run -d java-database -o out overrides.ql
A fatal error occurred: [redacted]/out is a directory.
> rmdir out
> codeql query run -d java-database -o out overrides.ql
A fatal error occurred: The output location [redacted]/out is not a directory, so only a single query can be executed.
```
`overrides.ql` is taken from https://help.semmle.com/QL/learn-ql/java/annotations.html
```codeql
import java
from Method overriding, Method overridden
where overriding.overrides(overridden) and
not overriding.getAnAnnotation() instanceof OverrideAnnotation
select overriding, "Method overrides another method, but does not have an @Override annotation."
```
```console
> codeql version
CodeQL command-line toolchain.
Version: 2.2.3.
Copyright (C) 2019-2020 GitHub, Inc.
Unpacked in: /nix/store/s5zfg5vzrfrfc3mqyh3g0r4r6mpqc2g1-codeql-2.2.3/codeql
Analysis results depend critically on separately distributed query and
extractor modules. To list modules that are visible to the toolchain,
use 'codeql resolve qlpacks' and 'codeql resolve languages'.
> uname -a
Linux nixos 5.9.1 #1-NixOS SMP Sat Oct 17 06:31:22 UTC 2020 x86_64 GNU/Linux
> nixos-version
20.09.1500.edb26126d98 (Nightingale)
```
Contributor guide
Research direction
Reproduce the two `codeql query run` commands using `-o out`, with `out` first a directory and then absent, and compare the differing errors. Trace the CLI handling of the output location and determine the intended behavior for a single query versus multiple queries. Done means the output-location behavior is consistent and covered for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100