github / github/codeql-cli-binaries

The output location should both be a directory and not be directory

未关闭
#48 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
CLI
主要语言
没有语言数据
星标
1k
派生
184
PR 合并指标
30 天内没有已合并 PR

描述

```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)
```

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。